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

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

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/ContextLifecycleObserver.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContextLifecycleObserver.cpp
diff --git a/Source/core/dom/ContextLifecycleObserver.cpp b/Source/core/dom/ContextLifecycleObserver.cpp
index 656f54e247681a3801ccc64453bbb68c7ee45ce3..baaa37ce093a816afaffbdcf1c19de23ea150bc5 100644
--- a/Source/core/dom/ContextLifecycleObserver.cpp
+++ b/Source/core/dom/ContextLifecycleObserver.cpp
@@ -32,7 +32,8 @@
namespace WebCore {
ContextLifecycleObserver::ContextLifecycleObserver(ScriptExecutionContext* scriptExecutionContext, Type type)
- : m_scriptExecutionContext(0)
+ : LifecycleObserver(scriptExecutionContext)
+ , m_scriptExecutionContext(0)
{
observeContext(scriptExecutionContext, type);
}
@@ -51,6 +52,7 @@ void ContextLifecycleObserver::observeContext(ScriptExecutionContext* scriptExec
}
m_scriptExecutionContext = scriptExecutionContext;
+ m_lifecycleContext = scriptExecutionContext;
if (m_scriptExecutionContext) {
ASSERT(m_scriptExecutionContext->isContextThread());
@@ -61,6 +63,8 @@ void ContextLifecycleObserver::observeContext(ScriptExecutionContext* scriptExec
void ContextLifecycleObserver::contextDestroyed()
{
m_scriptExecutionContext = 0;
+
+ LifecycleObserver::contextDestroyed();
}
} // namespace WebCore
« no previous file with comments | « Source/core/dom/ContextLifecycleObserver.h ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698