webengine/osswebengine/WebCore/platform/symbian/OOMStopper.h
changeset 11 c8a366e56285
child 15 60c5402cb945
equal deleted inserted replaced
10:a359256acfc6 11:c8a366e56285
       
     1 /*
       
     2 * Copyright (c) 2006 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 the License "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 
       
    19 #ifndef __OOMSTOPPER_H__
       
    20 #define __OOMSTOPPER_H__
       
    21 
       
    22 #include <e32def.h>
       
    23 #include "MemoryManager.h"
       
    24 
       
    25 namespace WebCore {
       
    26 
       
    27 /*
       
    28  * This handles stopping things when OOM occurs, by stopping page loading.
       
    29  * The StopScheduler has two OOM modes, Normal and Emergency.  Normal mode 
       
    30  * calls all low priority stoppers.  Emergency mode calls all high priority stoppers.
       
    31  * (For some reason, emergency mode never seems to occur).   This stopper is low 
       
    32  * priority because we want to always stop page loading whenever OOM happens
       
    33  * (not just in emergency OOM situations).
       
    34  */
       
    35 class OOMStopper : public MOOMStopper
       
    36 {
       
    37 public:
       
    38     OOMStopper();
       
    39     virtual ~OOMStopper();
       
    40 
       
    41     void Stop();
       
    42 
       
    43     // Priority is low because we always want to stop page loading when we're low on memory; not just during an emergency memory situation
       
    44     TOOMPriority Priority()     { return EOOM_PriorityLow; }
       
    45 };
       
    46 
       
    47 }
       
    48 
       
    49 #endif // END OF FILE