18 #include <AknDef.h> |
18 #include <AknDef.h> |
19 #include <apgwgnam.h> |
19 #include <apgwgnam.h> |
20 #include <apgtask.h> |
20 #include <apgtask.h> |
21 |
21 |
22 #include "tsrunningappmodel.h" |
22 #include "tsrunningappmodel.h" |
23 |
23 #include "tsrunningappstorageimp.h" |
24 #include "tsrunningappstorage.h" |
|
25 |
|
26 #include "tsdatalist.h" |
24 #include "tsdatalist.h" |
27 #include "tsmodelobserver.h" |
25 #include "tsmodelobserver.h" |
28 #include "tsscreenshotprovider.h" |
26 #include "tsscreenshotprovider.h" |
|
27 #include "tsresourcemanager.h" |
29 |
28 |
30 CTsRunningAppModel *CTsRunningAppModel::NewL( MTsResourceManager& aResources, |
29 CTsRunningAppModel *CTsRunningAppModel::NewL( MTsResourceManager& aResources, |
31 MTsWindowGroupsMonitor& aMonitor, |
|
32 TsEnv& aEnv ) |
30 TsEnv& aEnv ) |
33 { |
31 { |
34 CTsRunningAppModel *self = CTsRunningAppModel::NewLC( aResources, aMonitor, aEnv ); |
32 CTsRunningAppModel *self = CTsRunningAppModel::NewLC( aResources, aEnv ); |
35 CleanupStack::Pop( self ); |
33 CleanupStack::Pop( self ); |
36 return self; |
34 return self; |
37 } |
35 } |
38 |
36 |
39 CTsRunningAppModel *CTsRunningAppModel::NewLC( MTsResourceManager& aResources, |
37 CTsRunningAppModel *CTsRunningAppModel::NewLC( MTsResourceManager& aResources, |
40 MTsWindowGroupsMonitor& aMonitor, |
|
41 TsEnv& aEnv ) |
38 TsEnv& aEnv ) |
42 { |
39 { |
43 CTsRunningAppModel *self = new (ELeave) CTsRunningAppModel( aResources ); |
40 CTsRunningAppModel *self = new (ELeave) CTsRunningAppModel( aResources ); |
44 CleanupStack::PushL( self ); |
41 CleanupStack::PushL( self ); |
45 self->ConstructL( aResources, aMonitor, aEnv ); |
42 self->ConstructL( aResources, aEnv ); |
46 return self; |
43 return self; |
47 } |
44 } |
48 |
45 |
49 CTsRunningAppModel::~CTsRunningAppModel() |
46 CTsRunningAppModel::~CTsRunningAppModel() |
50 { |
47 { |
57 iResources( aResources ) |
54 iResources( aResources ) |
58 { |
55 { |
59 } |
56 } |
60 |
57 |
61 void CTsRunningAppModel::ConstructL( MTsResourceManager& aResources, |
58 void CTsRunningAppModel::ConstructL( MTsResourceManager& aResources, |
62 MTsWindowGroupsMonitor& aMonitor, |
|
63 TsEnv& aEnv) |
59 TsEnv& aEnv) |
64 { |
60 { |
65 iDataList = CTsDataList::NewL( aResources, aMonitor, *this, aEnv ); |
61 iDataList = CTsDataList::NewL( aResources, *this, aEnv ); |
66 iScreenshotProvider = CTsScreenshotProvider::NewL(*iDataList, aMonitor ); |
62 iScreenshotProvider = |
|
63 CTsScreenshotProvider::NewL(*iDataList, aResources.WsMonitor()); |
67 |
64 |
68 RArray<RWsSession::TWindowGroupChainInfo> wgList; |
65 RArray<RWsSession::TWindowGroupChainInfo> wgList; |
69 CleanupClosePushL( wgList ); |
66 CleanupClosePushL( wgList ); |
70 User::LeaveIfError( aResources.WsSession().WindowGroupList( 0, &wgList ) ); |
67 User::LeaveIfError( aResources.WsSession().WindowGroupList( 0, &wgList ) ); |
71 CTsRunningAppStorage* storage = CTsRunningAppStorage::NewLC(); |
68 CTsRunningAppStorage* storage = CTsRunningAppStorage::NewLC(); |