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" |
(...skipping 12 matching lines...) Expand all Loading... |
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, 0, WrapperTy
peInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeI
nfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent, WrapperTypeInfo::Ref
CountedObject }; |
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 static void TestInterfaceNamedConstructorConstructorGetter(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 33 template<class CallbackInfo> |
34 { | 34 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::S
tring> name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
35 v8::Local<v8::Value> data = info.Data(); | |
36 ASSERT(data->IsExternal()); | |
37 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | |
38 if (!perContextData) | |
39 return; | |
40 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | |
41 } | |
42 | |
43 static void TestInterfaceNamedConstructorForceSetAttributeOnThis(v8::Local<v8::S
tring> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>&
info) | |
44 { | 35 { |
45 if (info.This()->IsObject()) | 36 if (info.This()->IsObject()) |
46 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 37 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
47 } | 38 } |
48 | 39 |
49 static void TestInterfaceNamedConstructorForceSetAttributeOnThisCallback(v8::Loc
al<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) | 40 static void TestInterfaceNamedConstructorForceSetAttributeOnThisCallback(v8::Loc
al<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info) |
50 { | 41 { |
51 TestInterfaceNamedConstructorV8Internal::TestInterfaceNamedConstructorForceS
etAttributeOnThis(name, v8Value, info); | 42 TestInterfaceNamedConstructorV8Internal::TestInterfaceNamedConstructorForceS
etAttributeOnThis(name, v8Value, info); |
52 } | 43 } |
53 | 44 |
| 45 static void TestInterfaceNamedConstructorConstructorGetter(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 46 { |
| 47 v8::Local<v8::Value> data = info.Data(); |
| 48 ASSERT(data->IsExternal()); |
| 49 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
| 50 if (!perContextData) |
| 51 return; |
| 52 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
| 53 } |
| 54 |
54 } // namespace TestInterfaceNamedConstructorV8Internal | 55 } // namespace TestInterfaceNamedConstructorV8Internal |
55 | 56 |
56 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { | 57 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { |
57 {"testNamedConstructorConstructorAttribute", TestInterfaceNamedConstructorV8
Internal::TestInterfaceNamedConstructorConstructorGetter, TestInterfaceNamedCons
tructorV8Internal::TestInterfaceNamedConstructorForceSetAttributeOnThisCallback,
0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, | 58 {"testNamedConstructorConstructorAttribute", TestInterfaceNamedConstructorV8
Internal::TestInterfaceNamedConstructorConstructorGetter, TestInterfaceNamedCons
tructorV8Internal::TestInterfaceNamedConstructorForceSetAttributeOnThisCallback,
0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, |
58 }; | 59 }; |
59 | 60 |
60 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 }; | 61 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 }; |
61 | 62 |
62 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 63 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
63 { | 64 { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 { | 193 { |
193 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); | 194 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); |
194 } | 195 } |
195 | 196 |
196 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) | 197 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) |
197 { | 198 { |
198 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); | 199 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); |
199 } | 200 } |
200 | 201 |
201 } // namespace blink | 202 } // namespace blink |
OLD | NEW |