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

Side by Side Diff: Source/modules/InitModules.cpp

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, 6 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 unified diff | Download patch
« no previous file with comments | « Source/modules/InitModules.h ('k') | Source/web/WebDocument.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "InitModules.h" 6 #include "InitModules.h"
7 7
8 #include "EventModulesFactory.h" 8 #include "EventModulesFactory.h"
9 #include "EventModulesNames.h" 9 #include "EventModulesNames.h"
10 #include "EventTargetModulesNames.h" 10 #include "EventTargetModulesNames.h"
11 #include "EventTypeNames.h" 11 #include "EventTypeNames.h"
12 #include "core/dom/Document.h" 12 #include "core/dom/Document.h"
13 13
14 namespace WebCore { 14 namespace WebCore {
15 15
16 void ModulesInitializer::initEventNames() 16 void ModulesInitializer::initEventNames()
17 { 17 {
18 EventNames::init(); 18 EventNames::init();
19 EventNames::initModules(); 19 EventNames::initModules();
20 } 20 }
21 21
22 void ModulesInitializer::initEventTargetNames() 22 void ModulesInitializer::initEventTargetNames()
23 { 23 {
24 EventTargetNames::init(); 24 EventTargetNames::init();
25 EventTargetNames::initModules(); 25 EventTargetNames::initModules();
26 } 26 }
27 27
28 PassRefPtrWillBeRawPtr<Event> createEventModules(const String& eventType, Except ionState& exceptionState) 28 void ModulesInitializer::registerEventFactory()
29 { 29 {
30 RefPtrWillBeRawPtr<Event> event = EventModulesFactory::create(eventType); 30 CoreInitializer::registerEventFactory();
31 if (event) 31 Document::registerEventFactory(new EventModulesFactory());
32 return event.release();
33
34 return Document::createEvent(eventType, exceptionState);
35 } 32 }
36 33
37 } // namespace WebCore 34 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/InitModules.h ('k') | Source/web/WebDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698