| 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 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
| 9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
| 10 | 10 |
| 11 #include "bindings/core/v8/ExceptionState.h" | 11 #include "bindings/core/v8/ExceptionState.h" |
| 12 #include "bindings/core/v8/ScriptState.h" | 12 #include "bindings/core/v8/ScriptState.h" |
| 13 #include "bindings/core/v8/ScriptValue.h" | 13 #include "bindings/core/v8/ScriptValue.h" |
| 14 #include "bindings/core/v8/V8DOMConfiguration.h" | 14 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 15 #include "bindings/core/v8/V8Iterator.h" | 15 #include "bindings/core/v8/V8Iterator.h" |
| 16 #include "bindings/core/v8/V8ObjectConstructor.h" | 16 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
| 18 #include "bindings/modules/v8/UnionTypesModules.h" | 18 #include "bindings/modules/v8/UnionTypesModules.h" |
| 19 #include "bindings/modules/v8/V8TestInterface5.h" | 19 #include "bindings/modules/v8/V8TestInterface5.h" |
| 20 #include "core/dom/ContextFeatures.h" | 20 #include "core/dom/ContextFeatures.h" |
| 21 #include "core/dom/Document.h" | 21 #include "core/dom/Document.h" |
| 22 #include "platform/RuntimeEnabledFeatures.h" | 22 #include "platform/RuntimeEnabledFeatures.h" |
| 23 #include "platform/TraceEvent.h" | 23 #include "platform/TraceEvent.h" |
| 24 #include "wtf/GetPtr.h" | 24 #include "wtf/GetPtr.h" |
| 25 #include "wtf/RefPtr.h" | 25 #include "wtf/RefPtr.h" |
| 26 | 26 |
| 27 namespace blink { | 27 namespace blink { |
| 28 | 28 |
| 29 const WrapperTypeInfo V8TestInterface5::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface5::domTemplate, V8TestInterface5::refObject, V8TestInterface5::d
erefObject, V8TestInterface5::trace, V8TestInterface5::toActiveDOMObject, V8Test
Interface5::visitDOMWrapper, V8TestInterface5::installConditionallyEnabledMethod
s, V8TestInterface5::installConditionallyEnabledProperties, "TestInterface5", &V
8TestInterfaceEmpty::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototyp
e, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, W
rapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 29 const WrapperTypeInfo V8TestInterface5::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface5::domTemplate, V8TestInterface5::refObject, V8TestInterface5::d
erefObject, V8TestInterface5::trace, V8TestInterface5::toActiveDOMObject, V8Test
Interface5::visitDOMWrapper, V8TestInterface5::preparePrototypeObject, V8TestInt
erface5::installConditionallyEnabledProperties, "TestInterface5", &V8TestInterfa
ceEmpty::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTy
peInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeIn
fo::Dependent, WrapperTypeInfo::RefCountedObject }; |
| 30 | 30 |
| 31 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. | 31 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e5Implementation.h. |
| 32 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 32 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 33 // bindings/core/v8/ScriptWrappable.h. | 33 // bindings/core/v8/ScriptWrappable.h. |
| 34 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; | 34 const WrapperTypeInfo& TestInterface5Implementation::s_wrapperTypeInfo = V8TestI
nterface5::wrapperTypeInfo; |
| 35 | 35 |
| 36 namespace TestInterface5ImplementationV8Internal { | 36 namespace TestInterface5ImplementationV8Internal { |
| 37 | 37 |
| 38 template<class CallbackInfo> | 38 template<class CallbackInfo> |
| 39 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::Na
me> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 39 static void TestInterface5ImplementationForceSetAttributeOnThis(v8::Local<v8::Na
me> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1010 if (context && (context->isWorkerGlobalScope())) { | 1010 if (context && (context->isWorkerGlobalScope())) { |
| 1011 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::work
erExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna
l::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces
sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi
guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; | 1011 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::work
erExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna
l::workerExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces
sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi
guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 1012 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); | 1012 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 1013 } | 1013 } |
| 1014 if (context && (context->isDocument())) { | 1014 if (context && (context->isDocument())) { |
| 1015 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::wind
owExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna
l::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces
sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi
guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; | 1015 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::wind
owExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Interna
l::windowExposedAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Acces
sControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfi
guration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}; |
| 1016 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); | 1016 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeO
bject, attributeConfiguration); |
| 1017 } | 1017 } |
| 1018 } | 1018 } |
| 1019 | 1019 |
| 1020 void V8TestInterface5::installConditionallyEnabledMethods(v8::Local<v8::Object>
prototypeObject, v8::Isolate* isolate) | 1020 void V8TestInterface5::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8
::Object> prototypeObject) |
| 1021 { | 1021 { |
| 1022 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); | 1022 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT
emplate(isolate)); |
| 1023 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); | 1023 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont
ext()); |
| 1024 ASSERT(context); | 1024 ASSERT(context); |
| 1025 | |
| 1026 if (context && (context->isWorkerGlobalScope())) { | 1025 if (context && (context->isWorkerGlobalScope())) { |
| 1027 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8:
:FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::workerEx
posedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isol
ate->GetCurrentContext()).ToLocalChecked()); | 1026 prototypeObject->Set(v8AtomicString(isolate, "workerExposedMethod"), v8:
:FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::workerEx
posedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isol
ate->GetCurrentContext()).ToLocalChecked()); |
| 1028 } | 1027 } |
| 1029 if (context && (context->isDocument())) { | 1028 if (context && (context->isDocument())) { |
| 1030 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8:
:FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::windowEx
posedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isol
ate->GetCurrentContext()).ToLocalChecked()); | 1029 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8:
:FunctionTemplate::New(isolate, TestInterface5ImplementationV8Internal::windowEx
posedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction(isol
ate->GetCurrentContext()).ToLocalChecked()); |
| 1031 } | 1030 } |
| 1032 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope
())) { | 1031 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope
())) { |
| 1033 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo
sedMethod"), v8::FunctionTemplate::New(isolate, TestInterface5ImplementationV8In
ternal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), defaul
tSignature, 0)->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); | 1032 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo
sedMethod"), v8::FunctionTemplate::New(isolate, TestInterface5ImplementationV8In
ternal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), defaul
tSignature, 0)->GetFunction(isolate->GetCurrentContext()).ToLocalChecked()); |
| 1034 } | 1033 } |
| 1035 } | 1034 } |
| 1036 | 1035 |
| 1037 ActiveDOMObject* V8TestInterface5::toActiveDOMObject(v8::Local<v8::Object> wrapp
er) | 1036 ActiveDOMObject* V8TestInterface5::toActiveDOMObject(v8::Local<v8::Object> wrapp
er) |
| 1038 { | 1037 { |
| 1039 return toImpl(wrapper); | 1038 return toImpl(wrapper); |
| 1040 } | 1039 } |
| 1041 | 1040 |
| 1042 void V8TestInterface5::refObject(ScriptWrappable* scriptWrappable) | 1041 void V8TestInterface5::refObject(ScriptWrappable* scriptWrappable) |
| 1043 { | 1042 { |
| 1044 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 1043 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 1045 } | 1044 } |
| 1046 | 1045 |
| 1047 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 1046 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 1048 { | 1047 { |
| 1049 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 1048 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 1050 } | 1049 } |
| 1051 | 1050 |
| 1052 } // namespace blink | 1051 } // namespace blink |
| 1053 #endif // ENABLE(CONDITION) | 1052 #endif // ENABLE(CONDITION) |
| OLD | NEW |