OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "bindings/modules/v8/ModuleBindingsInitializer.h" | 6 #include "bindings/modules/v8/ModuleBindingsInitializer.h" |
7 | 7 |
8 #include "bindings/core/v8/ModuleProxy.h" | 8 #include "bindings/core/v8/ModuleProxy.h" |
9 #include "bindings/core/v8/V8Event.h" | 9 #include "bindings/core/v8/V8Event.h" |
10 #include "bindings/core/v8/V8EventTarget.h" | 10 #include "bindings/core/v8/V8EventTarget.h" |
11 #include "modules/EventModulesHeaders.h" | 11 #include "modules/EventModulesHeaders.h" |
12 #include "modules/EventModulesInterfaces.h" | 12 #include "modules/EventModulesInterfaces.h" |
13 #include "modules/EventTargetModulesHeaders.h" | 13 #include "modules/EventTargetModulesHeaders.h" |
14 #include "modules/EventTargetModulesInterfaces.h" | 14 #include "modules/EventTargetModulesInterfaces.h" |
15 #include "modules/indexeddb/IDBPendingTransactionMonitor.h" | 15 #include "modules/indexeddb/IDBPendingTransactionMonitor.h" |
16 | 16 |
17 namespace WebCore { | 17 namespace blink { |
18 | 18 |
19 #define TRY_TO_WRAP_WITH_INTERFACE(interfaceName) \ | 19 #define TRY_TO_WRAP_WITH_INTERFACE(interfaceName) \ |
20 if (EventNames::interfaceName == desiredInterface) \ | 20 if (EventNames::interfaceName == desiredInterface) \ |
21 return wrap(static_cast<interfaceName*>(event), creationContext, isolate
); | 21 return wrap(static_cast<interfaceName*>(event), creationContext, isolate
); |
22 | 22 |
23 static v8::Handle<v8::Object> wrapForModuleEvent(Event* event, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate *isolate) | 23 static v8::Handle<v8::Object> wrapForModuleEvent(Event* event, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate *isolate) |
24 { | 24 { |
25 ASSERT(event); | 25 ASSERT(event); |
26 | 26 |
27 String desiredInterface = event->interfaceName(); | 27 String desiredInterface = event->interfaceName(); |
(...skipping 26 matching lines...) Expand all Loading... |
54 IDBPendingTransactionMonitor::from(executionContext).deactivateNewTransactio
ns(); | 54 IDBPendingTransactionMonitor::from(executionContext).deactivateNewTransactio
ns(); |
55 } | 55 } |
56 | 56 |
57 void ModuleBindingsInitializer::init() | 57 void ModuleBindingsInitializer::init() |
58 { | 58 { |
59 ModuleProxy::moduleProxy().registerWrapForEvent(wrapForModuleEvent); | 59 ModuleProxy::moduleProxy().registerWrapForEvent(wrapForModuleEvent); |
60 ModuleProxy::moduleProxy().registerToV8ForEventTarget(toV8ForModuleEventTarg
et); | 60 ModuleProxy::moduleProxy().registerToV8ForEventTarget(toV8ForModuleEventTarg
et); |
61 ModuleProxy::moduleProxy().registerDidLeaveScriptContextForRecursionScope(di
dLeaveScriptContextForModule); | 61 ModuleProxy::moduleProxy().registerDidLeaveScriptContextForRecursionScope(di
dLeaveScriptContextForModule); |
62 } | 62 } |
63 | 63 |
64 } // namespace WebCore | 64 } // namespace blink |
OLD | NEW |