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 "V8TestTypedefs.h" | 8 #include "V8TestTypedefs.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
11 #include "bindings/core/v8/UnionTypesCore.h" | 11 #include "bindings/core/v8/UnionTypesCore.h" |
12 #include "bindings/core/v8/V8DOMConfiguration.h" | 12 #include "bindings/core/v8/V8DOMConfiguration.h" |
13 #include "bindings/core/v8/V8HiddenValue.h" | 13 #include "bindings/core/v8/V8HiddenValue.h" |
14 #include "bindings/core/v8/V8ObjectConstructor.h" | 14 #include "bindings/core/v8/V8ObjectConstructor.h" |
15 #include "bindings/core/v8/V8TestCallbackInterface.h" | 15 #include "bindings/core/v8/V8TestCallbackInterface.h" |
16 #include "bindings/core/v8/V8TestInterface.h" | 16 #include "bindings/core/v8/V8TestInterface.h" |
17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 17 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
18 #include "core/dom/ContextFeatures.h" | 18 #include "core/dom/ContextFeatures.h" |
19 #include "core/dom/Document.h" | 19 #include "core/dom/Document.h" |
20 #include "core/frame/LocalDOMWindow.h" | 20 #include "core/frame/LocalDOMWindow.h" |
21 #include "platform/RuntimeEnabledFeatures.h" | 21 #include "platform/RuntimeEnabledFeatures.h" |
22 #include "platform/TraceEvent.h" | 22 #include "platform/TraceEvent.h" |
23 #include "wtf/GetPtr.h" | 23 #include "wtf/GetPtr.h" |
24 #include "wtf/RefPtr.h" | 24 #include "wtf/RefPtr.h" |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
27 | 27 |
28 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V
8TestTypedefs::domTemplate, V8TestTypedefs::refObject, V8TestTypedefs::derefObje
ct, V8TestTypedefs::trace, 0, 0, V8TestTypedefs::installConditionallyEnabledMeth
ods, V8TestTypedefs::installConditionallyEnabledProperties, 0, WrapperTypeInfo::
WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Not
InheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo::RefCounte
dObject }; | 28 const WrapperTypeInfo V8TestTypedefs::wrapperTypeInfo = { gin::kEmbedderBlink, V
8TestTypedefs::domTemplate, V8TestTypedefs::refObject, V8TestTypedefs::derefObje
ct, V8TestTypedefs::trace, 0, 0, V8TestTypedefs::installConditionallyEnabledMeth
ods, V8TestTypedefs::installConditionallyEnabledProperties, "TestTypedefs", 0, W
rapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, Wrap
perTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTyp
eInfo::RefCountedObject }; |
29 | 29 |
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs
.h. | 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs
.h. |
31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
32 // bindings/core/v8/ScriptWrappable.h. | 32 // bindings/core/v8/ScriptWrappable.h. |
33 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper
TypeInfo; | 33 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper
TypeInfo; |
34 | 34 |
35 namespace TestTypedefsV8Internal { | 35 namespace TestTypedefsV8Internal { |
36 | 36 |
37 template<class CallbackInfo> | 37 template<class CallbackInfo> |
38 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::Name> name, v8::Lo
cal<v8::Value> v8Value, const CallbackInfo& info) | 38 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::Name> name, v8::Lo
cal<v8::Value> v8Value, const CallbackInfo& info) |
39 { | 39 { |
40 ASSERT(info.This()->IsObject()); | 40 ASSERT(info.This()->IsObject()); |
41 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); | 41 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); |
42 } | 42 } |
43 | 43 |
| 44 static void TestTypedefsConstructorAttributeSetterCallback(v8::Local<v8::Name>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 45 { |
| 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 47 do { |
| 48 v8::Local<v8::Value> data = info.Data(); |
| 49 ASSERT(data->IsExternal()); |
| 50 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()-
>CreationContext()); |
| 51 if (!perContextData) |
| 52 break; |
| 53 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); |
| 54 if (!wrapperTypeInfo) |
| 55 break; |
| 56 TestTypedefsForceSetAttributeOnThis(v8String(info.GetIsolate(), wrapperT
ypeInfo->interfaceName), v8Value, info); |
| 57 } while (false); // do ... while (false) just for use of break |
| 58 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 59 } |
| 60 |
44 static void uLongLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 61 static void uLongLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
45 { | 62 { |
46 v8::Local<v8::Object> holder = info.Holder(); | 63 v8::Local<v8::Object> holder = info.Holder(); |
47 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 64 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
48 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); | 65 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); |
49 } | 66 } |
50 | 67 |
51 static void uLongLongAttributeAttributeGetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 68 static void uLongLongAttributeAttributeGetterCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
52 { | 69 { |
53 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 70 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 301 } |
285 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); | 302 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); |
286 v8::Local<v8::Object> wrapper = info.Holder(); | 303 v8::Local<v8::Object> wrapper = info.Holder(); |
287 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn
fo, wrapper); | 304 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn
fo, wrapper); |
288 v8SetReturnValue(info, wrapper); | 305 v8SetReturnValue(info, wrapper); |
289 } | 306 } |
290 | 307 |
291 } // namespace TestTypedefsV8Internal | 308 } // namespace TestTypedefsV8Internal |
292 | 309 |
293 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { | 310 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { |
294 {"tAttribute", v8ConstructorAttributeGetterAsProperty, TestTypedefsV8Interna
l::tAttributeAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8Test
Interface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static
_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScri
pts, V8DOMConfiguration::OnInstance}, | 311 {"tAttribute", v8ConstructorAttributeGetter, TestTypedefsV8Internal::tAttrib
uteAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestInterface:
:wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::
PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOM
Configuration::OnInstance}, |
295 }; | 312 }; |
296 | 313 |
297 static const V8DOMConfiguration::AccessorConfiguration V8TestTypedefsAccessors[]
= { | 314 static const V8DOMConfiguration::AccessorConfiguration V8TestTypedefsAccessors[]
= { |
298 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, | 315 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts}, |
299 }; | 316 }; |
300 | 317 |
301 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { | 318 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { |
302 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 319 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs
ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
303 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt
ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, | 320 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt
ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, |
304 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho
dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, | 321 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho
dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo
AllScripts}, |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 { | 386 { |
370 scriptWrappable->toImpl<TestTypedefs>()->ref(); | 387 scriptWrappable->toImpl<TestTypedefs>()->ref(); |
371 } | 388 } |
372 | 389 |
373 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) | 390 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) |
374 { | 391 { |
375 scriptWrappable->toImpl<TestTypedefs>()->deref(); | 392 scriptWrappable->toImpl<TestTypedefs>()->deref(); |
376 } | 393 } |
377 | 394 |
378 } // namespace blink | 395 } // namespace blink |
OLD | NEW |