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

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

Issue 968633002: Simplify lifecycle notifiers and observers. (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
Index: Source/core/page/PageLifecycleObserver.cpp
diff --git a/Source/core/page/PageLifecycleObserver.cpp b/Source/core/page/PageLifecycleObserver.cpp
index eb370deacd32f9c95486a3f05d9de494a96c5aab..b1e74407b844381f1cda9be7d485632bd2864eb2 100644
--- a/Source/core/page/PageLifecycleObserver.cpp
+++ b/Source/core/page/PageLifecycleObserver.cpp
@@ -27,24 +27,12 @@
#include "config.h"
#include "core/page/PageLifecycleObserver.h"
-#include "core/page/Page.h"
-#include "core/page/PageLifecycleNotifier.h"
-
namespace blink {
-template<> void observeContext(Page* context, LifecycleObserver<Page>* observer)
-{
- context->addObserver(observer);
-}
-
-template<> void unobserveContext(Page* context, LifecycleObserver<Page>* observer)
-{
- context->removeObserver(observer);
-}
-
PageLifecycleObserver::PageLifecycleObserver(Page* page)
- : LifecycleObserver<Page>(page, PageLifecycleObserverType)
+ : LifecycleObserver<Page, PageLifecycleObserver, PageLifecycleNotifier>(page)
{
+ setContext(page);
}
PageLifecycleObserver::~PageLifecycleObserver()

Powered by Google App Engine
This is Rietveld 408576698