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

Unified Diff: Source/core/frame/DOMWindowLifecycleObserver.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/frame/DOMWindowLifecycleObserver.cpp
diff --git a/Source/core/frame/DOMWindowLifecycleObserver.cpp b/Source/core/frame/DOMWindowLifecycleObserver.cpp
index 7f5caca977f7e666982f96fc36787ec21a29cfb0..97e757ea9eeb8ed57f3a9b9cbd898b789f468f16 100644
--- a/Source/core/frame/DOMWindowLifecycleObserver.cpp
+++ b/Source/core/frame/DOMWindowLifecycleObserver.cpp
@@ -32,19 +32,10 @@
namespace blink {
-template<> void observeContext(LocalDOMWindow* context, LifecycleObserver<LocalDOMWindow>* observer)
-{
- context->addObserver(observer);
-}
-
-template<> void unobserveContext(LocalDOMWindow* context, LifecycleObserver<LocalDOMWindow>* observer)
-{
- context->removeObserver(observer);
-}
-
DOMWindowLifecycleObserver::DOMWindowLifecycleObserver(LocalDOMWindow* window)
- : LifecycleObserver<LocalDOMWindow>(window, DOMWindowLifecycleObserverType)
+ : LifecycleObserver<LocalDOMWindow, DOMWindowLifecycleObserver, DOMWindowLifecycleNotifier>(window)
{
+ setContext(window);
}
DOMWindowLifecycleObserver::~DOMWindowLifecycleObserver()

Powered by Google App Engine
This is Rietveld 408576698