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

Unified Diff: Source/core/dom/Document.h

Issue 305723002: Use method registration approach for creating events on core and modules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline Created 6 years, 7 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/Init.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 84e22c0ec67318a2668c9a1fb2a0ab1909cd837b..050ff54baefb140ccefe80c51cb908c3d5a4a917 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -95,6 +95,7 @@ class DocumentType;
class Element;
class ElementDataCache;
class Event;
+class EventFactoryBase;
class EventListener;
class ExceptionState;
class FastTextAutosizer;
@@ -694,6 +695,7 @@ public:
void setWindowAttributeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>);
EventListener* getWindowAttributeEventListener(const AtomicString& eventType);
+ static void registerEventFactory(EventFactoryBase*);
static PassRefPtrWillBeRawPtr<Event> createEvent(const String& eventType, ExceptionState&);
// keep track of what types of event listeners are registered, so we don't
@@ -1182,6 +1184,9 @@ private:
bool haveStylesheetsLoaded() const;
+ typedef HashSet<EventFactoryBase*> EventFactorySet;
+ static EventFactorySet& eventFactories();
+
DocumentLifecycle m_lifecycle;
bool m_hasNodesWithPlaceholderStyle;
« no previous file with comments | « Source/core/Init.cpp ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698