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

Unified Diff: Source/core/dom/DocumentLifecycleNotifier.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/dom/DocumentLifecycleNotifier.h
diff --git a/Source/core/dom/DocumentLifecycleNotifier.h b/Source/core/dom/DocumentLifecycleNotifier.h
index 229002a212b63bd1db64590e5c99ab4877f5d95b..e97edd1378527d0dfd43751ffebb457df83180ad 100644
--- a/Source/core/dom/DocumentLifecycleNotifier.h
+++ b/Source/core/dom/DocumentLifecycleNotifier.h
@@ -27,31 +27,24 @@
#define DocumentLifecycleNotifier_h
#include "platform/LifecycleNotifier.h"
-#include "wtf/HashSet.h"
-#include "wtf/PassOwnPtr.h"
-#include "wtf/TemporaryChange.h"
namespace blink {
class Document;
class DocumentLifecycleObserver;
-class DocumentLifecycleNotifier : public LifecycleNotifier<Document> {
+class DocumentLifecycleNotifier : public LifecycleNotifier<Document, DocumentLifecycleObserver> {
public:
+ void addObserver(DocumentLifecycleObserver*);
+ void removeObserver(DocumentLifecycleObserver*);
+
void notifyDocumentWasDetached();
#if !ENABLE(OILPAN)
void notifyDocumentWasDisposed();
#endif
- virtual void addObserver(Observer*) override final;
- virtual void removeObserver(Observer*) override final;
-
protected:
explicit DocumentLifecycleNotifier(Document*);
-
-private:
- using DocumentObserverSet = HashSet<DocumentLifecycleObserver*>;
- DocumentObserverSet m_documentObservers;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698