OLD | NEW |
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 |
OLD | NEW |