|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "MemSpyViewThreadInfoItemHeap.h" |
|
19 |
|
20 // Engine includes |
|
21 #include <memspy/engine/memspyengine.h> |
|
22 #include <memspy/engine/memspyengineobjectprocess.h> |
|
23 #include <memspy/engine/memspyengineobjectthread.h> |
|
24 #include <memspy/engine/memspyengineobjectcontainer.h> |
|
25 #include <memspy/engine/memspyengineobjectthreadinfoobjects.h> |
|
26 #include <memspy/engine/memspyengineobjectthreadinfocontainer.h> |
|
27 #include <memspy/engine/memspyenginehelperprocess.h> |
|
28 #include <memspy/engine/memspyenginehelperheap.h> |
|
29 #include <memspysession.h> |
|
30 |
|
31 // User includes |
|
32 #include "MemSpyContainerObserver.h" |
|
33 #include "MemSpyViewThreads.h" |
|
34 #include "MemSpyViewThreadInfoItemHeap.h" |
|
35 #include "MemSpyAppUi.h" |
|
36 |
|
37 |
|
38 /* |
|
39 CMemSpyViewThreadInfoItemHeap::CMemSpyViewThreadInfoItemHeap( CMemSpyEngine& aEngine, MMemSpyViewObserver& aObserver, CMemSpyThreadInfoContainer& aContainer ) |
|
40 : CMemSpyViewThreadInfoItemGeneric( aEngine, aObserver, aContainer, EMemSpyThreadInfoItemTypeHeap ) |
|
41 { |
|
42 } |
|
43 */ |
|
44 CMemSpyViewThreadInfoItemHeap::CMemSpyViewThreadInfoItemHeap( RMemSpySession& aSession, MMemSpyViewObserver& aObserver, TProcessId aProcId, TThreadId aId, TMemSpyThreadInfoItemType aType ) |
|
45 : CMemSpyViewThreadInfoItemGeneric( aSession, aObserver, aProcId, aId , EMemSpyThreadInfoItemTypeHeap ) |
|
46 { |
|
47 } |
|
48 |
|
49 |
|
50 TBool CMemSpyViewThreadInfoItemHeap::HandleCommandL( TInt aCommand ) |
|
51 { |
|
52 TBool handled = ETrue; |
|
53 // |
|
54 switch ( aCommand ) |
|
55 { |
|
56 #ifndef __WINS__ |
|
57 case EMemSpyCmdHeapDataDump: |
|
58 OnCmdHeapDataL(); |
|
59 break; |
|
60 #endif |
|
61 case EMemSpyCmdHeapCellListing: |
|
62 OnCmdHeapCellListingL(); |
|
63 break; |
|
64 case EMemSpyCmdHeapInfoThread: |
|
65 OnCmdHeapInfoL(); |
|
66 break; |
|
67 |
|
68 default: |
|
69 handled = CMemSpyViewBase::HandleCommandL( aCommand ); |
|
70 break; |
|
71 } |
|
72 // |
|
73 return handled; |
|
74 } |
|
75 |
|
76 |
|
77 void CMemSpyViewThreadInfoItemHeap::OnCmdHeapDataL() |
|
78 { |
|
79 iMemSpySession.OutputThreadHeapDataL( ThreadId() ); |
|
80 } |
|
81 |
|
82 |
|
83 void CMemSpyViewThreadInfoItemHeap::OnCmdHeapCellListingL() |
|
84 { |
|
85 iMemSpySession.OutputThreadCellListL( ThreadId() ); |
|
86 } |
|
87 |
|
88 |
|
89 void CMemSpyViewThreadInfoItemHeap::OnCmdHeapInfoL() |
|
90 { |
|
91 iMemSpySession.OutputHeapInfoUserL( ThreadId() ); |
|
92 } |
|
93 |
|
94 |
|
95 void CMemSpyViewThreadInfoItemHeap::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ) |
|
96 { |
|
97 if ( aResourceId == R_MEMSPY_MENUPANE ) |
|
98 { |
|
99 //aMenuPane->SetItemDimmed( EMemSpyCmdHeap, Thread().IsDead() ); //TODO |
|
100 } |
|
101 } |