Chromium Code Reviews| Index: Source/core/dom/ContextLifecycleNotifier.h | 
| diff --git a/Source/core/dom/ContextLifecycleNotifier.h b/Source/core/dom/ContextLifecycleNotifier.h | 
| index 178bf676ddc25d37917f03c261bbf2d8a4fd5fb1..3a4c914d973973124d58621585e1faf8e4ea69fb 100644 | 
| --- a/Source/core/dom/ContextLifecycleNotifier.h | 
| +++ b/Source/core/dom/ContextLifecycleNotifier.h | 
| @@ -30,26 +30,25 @@ | 
| #include "platform/LifecycleNotifier.h" | 
| #include "wtf/HashSet.h" | 
| -#include "wtf/PassOwnPtr.h" | 
| namespace blink { | 
| class ActiveDOMObject; | 
| +class ContextLifecycleObserver; | 
| class ExecutionContext; | 
| -class ContextLifecycleNotifier : public LifecycleNotifier<ExecutionContext> { | 
| +class ContextLifecycleNotifier : public LifecycleNotifier<ExecutionContext, ContextLifecycleObserver> { | 
| public: | 
| - typedef HashSet<ActiveDOMObject*> ActiveDOMObjectSet; | 
| - | 
| - const ActiveDOMObjectSet& activeDOMObjects() const { return m_activeDOMObjects; } | 
| - | 
| - virtual void addObserver(Observer*) override; | 
| - virtual void removeObserver(Observer*) override; | 
| + void addObserver(ContextLifecycleObserver*); | 
| + void removeObserver(ContextLifecycleObserver*); | 
| void notifyResumingActiveDOMObjects(); | 
| void notifySuspendingActiveDOMObjects(); | 
| void notifyStoppingActiveDOMObjects(); | 
| + using ActiveDOMObjectSet = HashSet<ActiveDOMObject*>; | 
| + | 
| + const ActiveDOMObjectSet& activeDOMObjects() const { return m_activeDOMObjects; } | 
| 
 
haraken
2015/03/01 09:18:39
Why do we need to keep m_activeDOMObjects while we
 
sof
2015/03/01 10:00:39
We can remove it also if we accept iterating over
 
haraken
2015/03/01 10:47:56
Sure. Also I'm wondering if a right fix would be t
 
sof
2015/03/01 17:21:37
Once this change has proven itself and settled wel
 
 | 
| bool contains(ActiveDOMObject* object) const { return m_activeDOMObjects.contains(object); } | 
| bool hasPendingActivity() const; |