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

Unified Diff: Source/core/page/PageLifecycleNotifier.h

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/PageLifecycleNotifier.h
diff --git a/Source/core/page/PageLifecycleNotifier.h b/Source/core/page/PageLifecycleNotifier.h
index 9c28c6731e14b984b42aea76ae3cb3e00dcde310..4d97cf826c872512cb1a427bc11d8e21cd1e2ebc 100644
--- a/Source/core/page/PageLifecycleNotifier.h
+++ b/Source/core/page/PageLifecycleNotifier.h
@@ -27,9 +27,6 @@
#define PageLifecycleNotifier_h
#include "platform/LifecycleNotifier.h"
-#include "wtf/HashSet.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/TemporaryChange.h"
namespace blink {
@@ -37,20 +34,16 @@ class LocalFrame;
class Page;
class PageLifecycleObserver;
-class PageLifecycleNotifier : public LifecycleNotifier<Page> {
+class PageLifecycleNotifier : public LifecycleNotifier<Page, PageLifecycleObserver> {
public:
+ void addObserver(PageLifecycleObserver*);
+ void removeObserver(PageLifecycleObserver*);
+
void notifyPageVisibilityChanged();
void notifyDidCommitLoad(LocalFrame*);
- virtual void addObserver(Observer*) override;
- virtual void removeObserver(Observer*) override;
-
protected:
explicit PageLifecycleNotifier(Page*);
-
-private:
- using PageObserverSet = HashSet<PageLifecycleObserver*>;
- PageObserverSet m_pageObservers;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698