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

Unified Diff: Source/modules/InitModules.cpp

Issue 297103002: Move modules-dependent Event code out of core. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments. 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/modules/InitModules.h ('k') | Source/modules/battery/BatteryDispatcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/InitModules.cpp
diff --git a/Source/modules/InitModules.cpp b/Source/modules/InitModules.cpp
index ce663d0f11cc2f8ac744155c7c3b7a0393abdd6e..d0e8b903aece57d655baf0d9f44347c09df8a86f 100644
--- a/Source/modules/InitModules.cpp
+++ b/Source/modules/InitModules.cpp
@@ -5,9 +5,11 @@
#include "config.h"
#include "InitModules.h"
+#include "EventModulesFactory.h"
#include "EventModulesNames.h"
#include "EventTargetModulesNames.h"
#include "EventTypeNames.h"
+#include "core/dom/Document.h"
namespace WebCore {
@@ -23,4 +25,13 @@ void ModulesInitializer::initEventTargetNames()
EventTargetNames::initModules();
}
+PassRefPtrWillBeRawPtr<Event> createEventModules(const String& eventType, ExceptionState& exceptionState)
+{
+ RefPtrWillBeRawPtr<Event> event = EventModulesFactory::create(eventType);
+ if (event)
+ return event.release();
+
+ return Document::createEvent(eventType, exceptionState);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/modules/InitModules.h ('k') | Source/modules/battery/BatteryDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698