Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: Source/core/dom/ContextLifecycleObserver.h

Issue 18777003: Extract simpler classes for observing context lifecycle and observe Page lifecycle inNavigatorVibra… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaselined~ Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.cpp ('k') | Source/core/dom/ContextLifecycleObserver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContextLifecycleObserver.h
diff --git a/Source/core/dom/ContextLifecycleObserver.h b/Source/core/dom/ContextLifecycleObserver.h
index 574455e861a357cf4f33514367aaf69b3657d5a9..a56b91c94a13e1df85f02c66bdf9a7c0b6ba37a6 100644
--- a/Source/core/dom/ContextLifecycleObserver.h
+++ b/Source/core/dom/ContextLifecycleObserver.h
@@ -27,25 +27,23 @@
#ifndef ContextLifecycleObserver_h
#define ContextLifecycleObserver_h
+#include "core/platform/LifecycleObserver.h"
+
namespace WebCore {
class ScriptExecutionContext;
-class ContextLifecycleObserver {
+class ContextLifecycleObserver : public LifecycleObserver {
public:
- enum Type {
- ActiveDOMObjectType,
- DocumentLifecycleObserverType,
- GenericType
- };
-
explicit ContextLifecycleObserver(ScriptExecutionContext*, Type = GenericType);
- virtual void contextDestroyed();
+
+ virtual void contextDestroyed() OVERRIDE;
ScriptExecutionContext* scriptExecutionContext() const { return m_scriptExecutionContext; }
protected:
virtual ~ContextLifecycleObserver();
+
void observeContext(ScriptExecutionContext*, Type);
ScriptExecutionContext* m_scriptExecutionContext;
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.cpp ('k') | Source/core/dom/ContextLifecycleObserver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698