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

Unified Diff: sky/engine/core/dom/Document.cpp

Issue 879743004: Remove the EventFactory machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Document.cpp
diff --git a/sky/engine/core/dom/Document.cpp b/sky/engine/core/dom/Document.cpp
index 5321c2335566d6cc46529e272538a7cf5f062473..41cddb15143286e677e76b8b03e254272caca10f 100644
--- a/sky/engine/core/dom/Document.cpp
+++ b/sky/engine/core/dom/Document.cpp
@@ -79,7 +79,6 @@
#include "sky/engine/core/editing/FrameSelection.h"
#include "sky/engine/core/editing/SpellChecker.h"
#include "sky/engine/core/events/Event.h"
-#include "sky/engine/core/events/EventFactory.h"
#include "sky/engine/core/events/EventListener.h"
#include "sky/engine/core/events/HashChangeEvent.h"
#include "sky/engine/core/events/PageTransitionEvent.h"
@@ -1844,30 +1843,6 @@ void Document::enqueueMediaQueryChangeListeners(Vector<RefPtr<MediaQueryListList
ensureScriptedAnimationController().enqueueMediaQueryChangeListeners(listeners);
}
-Document::EventFactorySet& Document::eventFactories()
-{
- DEFINE_STATIC_LOCAL(EventFactorySet, s_eventFactory, ());
- return s_eventFactory;
-}
-
-void Document::registerEventFactory(PassOwnPtr<EventFactoryBase> eventFactory)
-{
- ASSERT(!eventFactories().contains(eventFactory.get()));
- eventFactories().add(eventFactory);
-}
-
-PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionState& exceptionState)
-{
- RefPtr<Event> event = nullptr;
- for (EventFactorySet::const_iterator it = eventFactories().begin(); it != eventFactories().end(); ++it) {
- event = (*it)->create(eventType);
- if (event)
- return event.release();
- }
- exceptionState.throwDOMException(NotSupportedError, "The provided event type ('" + eventType + "') is invalid.");
- return nullptr;
-}
-
void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
{
if (eventType == EventTypeNames::animationstart) {
« no previous file with comments | « sky/engine/core/dom/Document.h ('k') | sky/engine/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698