equal
deleted
inserted
replaced
19 |
19 |
20 |
20 |
21 // INCLUDE FILES |
21 // INCLUDE FILES |
22 |
22 |
23 #include "widgetappdefs.rh" |
23 #include "widgetappdefs.rh" |
24 #include <apacmdln.h> |
24 #include <APACMDLN.H> |
25 #include <s32mem.h> |
25 #include <s32mem.h> |
26 #include <e32std.h> |
26 #include <e32std.h> |
27 #include <e32base.h> |
27 #include <e32base.h> |
28 #include <f32file.h> |
28 #include <f32file.h> |
29 #include <apgcli.h> |
29 #include <apgcli.h> |
30 #include <w32std.h> |
30 #include <W32STD.H> |
31 #include <apgtask.h> |
31 #include <APGTASK.H> |
32 #include <oommonitorsession.h> |
32 #include <oommonitorsession.h> |
33 #include <e32property.h> |
33 #include <e32property.h> |
|
34 #ifndef BRDO_OOM_MONITOR2_COMPONENT_FF |
34 #include <systemwarninglevels.hrh> |
35 #include <systemwarninglevels.hrh> |
35 #include "Browser_platform_variant.hrh" |
36 #endif |
|
37 #include "browser_platform_variant.hrh" |
36 |
38 |
37 // CONSTANTS |
39 // CONSTANTS |
38 #define KUidWidgetOOMPlugin 0x10282855 |
40 #define KUidWidgetOOMPlugin 0x10282855 |
39 const TInt KMemoryToLaunchWidgetUi = 17*1024*1024; |
41 const TInt KMemoryToLaunchWidgetUi = 17*1024*1024; |
40 |
42 |
207 aOperation == WidgetRestart ) //WidgetUI has died -> re-launch |
209 aOperation == WidgetRestart ) //WidgetUI has died -> re-launch |
208 { |
210 { |
209 TInt bytesAvailaible(0); |
211 TInt bytesAvailaible(0); |
210 if (aOperation != WidgetSelect && aOperation != LaunchFullscreen ) |
212 if (aOperation != WidgetSelect && aOperation != LaunchFullscreen ) |
211 { |
213 { |
212 #ifdef FF_OOM_MONITOR2_COMPONENT |
214 #ifdef BRDO_OOM_MONITOR2_COMPONENT_FF |
213 err = monitorSession.RequestOptionalRam(KMemoryToLaunchWidgetUi, KMemoryToLaunchWidgetUi,KUidWidgetOOMPlugin, bytesAvailaible); |
215 err = monitorSession.RequestOptionalRam(KMemoryToLaunchWidgetUi, KMemoryToLaunchWidgetUi,KUidWidgetOOMPlugin, bytesAvailaible); |
214 #else |
216 #else |
215 TMemoryInfoV1Buf info; |
217 TMemoryInfoV1Buf info; |
216 UserHal::MemoryInfo(info); |
218 UserHal::MemoryInfo(info); |
217 err = info().iFreeRamInBytes > KMemoryToLaunchWidgetUi + KRAMGOODTHRESHOLD ? KErrNone : KErrNoMemory; |
219 err = info().iFreeRamInBytes > KMemoryToLaunchWidgetUi + KRAMGOODTHRESHOLD ? KErrNone : KErrNoMemory; |