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

Unified Diff: Source/core/page/Page.cpp

Issue 901663005: Revert r189385 "Remove LifecycleContext" and r189391, r189530, r189456 that block it (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/page/Page.h ('k') | Source/core/page/PageLifecycleNotifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 576bb41fcad4513636510c7df7a6d767d9e3a6c8..012c258a692f831bca619bbbb892931d6abc00b6 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -50,6 +50,7 @@
#include "core/page/DragController.h"
#include "core/page/FocusController.h"
#include "core/page/FrameTree.h"
+#include "core/page/PageLifecycleNotifier.h"
#include "core/page/PointerLockController.h"
#include "core/page/ValidationMessageClient.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
@@ -112,8 +113,7 @@ float deviceScaleFactor(LocalFrame* frame)
}
Page::Page(PageClients& pageClients)
- : PageLifecycleNotifier(this)
- , SettingsDelegate(Settings::create())
+ : SettingsDelegate(Settings::create())
, m_animator(PageAnimator::create(*this))
, m_autoscrollController(AutoscrollController::create(*this))
, m_chrome(Chrome::create(this, pageClients.chromeClient))
@@ -427,7 +427,7 @@ void Page::setVisibilityState(PageVisibilityState visibilityState, bool isInitia
setTimerAlignmentInterval(DOMTimer::hiddenPageAlignmentInterval());
if (!isInitialState)
- notifyPageVisibilityChanged();
+ lifecycleNotifier().notifyPageVisibilityChanged();
if (!isInitialState && m_mainFrame && m_mainFrame->isLocalFrame())
deprecatedLocalMainFrame()->didChangeVisibilityState();
@@ -533,7 +533,7 @@ void Page::updateAcceleratedCompositingSettings()
void Page::didCommitLoad(LocalFrame* frame)
{
- notifyDidCommitLoad(frame);
+ lifecycleNotifier().notifyDidCommitLoad(frame);
if (m_mainFrame == frame) {
frame->console().clearMessages();
useCounter().didCommitLoad();
@@ -557,6 +557,16 @@ void Page::acceptLanguagesChanged()
frames[i]->localDOMWindow()->acceptLanguagesChanged();
}
+PageLifecycleNotifier& Page::lifecycleNotifier()
+{
+ return static_cast<PageLifecycleNotifier&>(LifecycleContext<Page>::lifecycleNotifier());
+}
+
+PassOwnPtr<LifecycleNotifier<Page>> Page::createLifecycleNotifier()
+{
+ return PageLifecycleNotifier::create(this);
+}
+
void Page::trace(Visitor* visitor)
{
#if ENABLE(OILPAN)
@@ -574,7 +584,7 @@ void Page::trace(Visitor* visitor)
visitor->trace(m_frameHost);
HeapSupplementable<Page>::trace(visitor);
#endif
- PageLifecycleNotifier::trace(visitor);
+ LifecycleContext<Page>::trace(visitor);
}
void Page::willBeDestroyed()
« no previous file with comments | « Source/core/page/Page.h ('k') | Source/core/page/PageLifecycleNotifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698