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 #include "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
11 #include "bindings/core/v8/V8DOMConfiguration.h" | 11 #include "bindings/core/v8/V8DOMConfiguration.h" |
12 #include "bindings/core/v8/V8HiddenValue.h" | 12 #include "bindings/core/v8/V8HiddenValue.h" |
13 #include "bindings/core/v8/V8ObjectConstructor.h" | 13 #include "bindings/core/v8/V8ObjectConstructor.h" |
14 #include "core/dom/ContextFeatures.h" | 14 #include "core/dom/ContextFeatures.h" |
15 #include "core/dom/Document.h" | 15 #include "core/dom/Document.h" |
16 #include "core/frame/LocalDOMWindow.h" | 16 #include "core/frame/LocalDOMWindow.h" |
17 #include "platform/RuntimeEnabledFeatures.h" | 17 #include "platform/RuntimeEnabledFeatures.h" |
18 #include "platform/TraceEvent.h" | 18 #include "platform/TraceEvent.h" |
19 #include "wtf/GetPtr.h" | 19 #include "wtf/GetPtr.h" |
20 #include "wtf/RefPtr.h" | 20 #include "wtf/RefPtr.h" |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
24 const WrapperTypeInfo V8TestInterfaceNamedConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceNamedConstructor::domTemplate, V8TestInterfaceNam
edConstructor::refObject, V8TestInterfaceNamedConstructor::derefObject, V8TestIn
terfaceNamedConstructor::trace, V8TestInterfaceNamedConstructor::toActiveDOMObje
ct, 0, V8TestInterfaceNamedConstructor::installConditionallyEnabledMethods, V8Te
stInterfaceNamedConstructor::installConditionallyEnabledProperties, 0, WrapperTy
peInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeI
nfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent, WrapperTypeInfo::Ref
CountedObject }; | 24 const WrapperTypeInfo V8TestInterfaceNamedConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceNamedConstructor::domTemplate, V8TestInterfaceNam
edConstructor::refObject, V8TestInterfaceNamedConstructor::derefObject, V8TestIn
terfaceNamedConstructor::trace, V8TestInterfaceNamedConstructor::toActiveDOMObje
ct, 0, V8TestInterfaceNamedConstructor::installConditionallyEnabledMethods, V8Te
stInterfaceNamedConstructor::installConditionallyEnabledProperties, "TestInterfa
ceNamedConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperType
Info::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo
::Dependent, WrapperTypeInfo::RefCountedObject }; |
25 | 25 |
26 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eNamedConstructor.h. | 26 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eNamedConstructor.h. |
27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
28 // bindings/core/v8/ScriptWrappable.h. | 28 // bindings/core/v8/ScriptWrappable.h. |
29 const WrapperTypeInfo& TestInterfaceNamedConstructor::s_wrapperTypeInfo = V8Test
InterfaceNamedConstructor::wrapperTypeInfo; | 29 const WrapperTypeInfo& TestInterfaceNamedConstructor::s_wrapperTypeInfo = V8Test
InterfaceNamedConstructor::wrapperTypeInfo; |
30 | 30 |
31 namespace TestInterfaceNamedConstructorV8Internal { | 31 namespace TestInterfaceNamedConstructorV8Internal { |
32 | 32 |
33 template<class CallbackInfo> | 33 template<class CallbackInfo> |
34 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::S
tring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 34 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::S
tring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
(...skipping 14 matching lines...) Expand all Loading... |
49 TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttr
ibuteAttributeSetter(v8Value, info); | 49 TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttr
ibuteAttributeSetter(v8Value, info); |
50 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 50 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
51 } | 51 } |
52 | 52 |
53 } // namespace TestInterfaceNamedConstructorV8Internal | 53 } // namespace TestInterfaceNamedConstructorV8Internal |
54 | 54 |
55 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { | 55 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { |
56 {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetterAsP
roperty, TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructo
rAttributeAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestNam
edConstructor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, | 56 {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetterAsP
roperty, TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructo
rAttributeAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestNam
edConstructor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAll
Scripts, V8DOMConfiguration::OnInstance}, |
57 }; | 57 }; |
58 | 58 |
59 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf
o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla
te, V8TestInterfaceNamedConstructor::refObject, V8TestInterfaceNamedConstructor:
:derefObject, V8TestInterfaceNamedConstructor::trace, V8TestInterfaceNamedConstr
uctor::toActiveDOMObject, 0, V8TestInterfaceNamedConstructor::installConditional
lyEnabledMethods, V8TestInterfaceNamedConstructor::installConditionallyEnabledPr
operties, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Objec
tClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent
, WrapperTypeInfo::RefCountedObject }; | 59 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf
o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla
te, V8TestInterfaceNamedConstructor::refObject, V8TestInterfaceNamedConstructor:
:derefObject, V8TestInterfaceNamedConstructor::trace, V8TestInterfaceNamedConstr
uctor::toActiveDOMObject, 0, V8TestInterfaceNamedConstructor::installConditional
lyEnabledMethods, V8TestInterfaceNamedConstructor::installConditionallyEnabledPr
operties, "TestInterfaceNamedConstructor", 0, WrapperTypeInfo::WrapperTypeObject
Prototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventT
arget, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; |
60 | 60 |
61 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 61 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
62 { | 62 { |
63 if (!info.IsConstructCall()) { | 63 if (!info.IsConstructCall()) { |
64 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("Audio")); | 64 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("Audio")); |
65 return; | 65 return; |
66 } | 66 } |
67 | 67 |
68 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 68 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
69 v8SetReturnValue(info, info.Holder()); | 69 v8SetReturnValue(info, info.Holder()); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 { | 191 { |
192 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); | 192 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); |
193 } | 193 } |
194 | 194 |
195 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) | 195 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) |
196 { | 196 { |
197 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); | 197 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); |
198 } | 198 } |
199 | 199 |
200 } // namespace blink | 200 } // namespace blink |
OLD | NEW |