Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: Source/bindings/tests/results/V8TestInterface3.cpp

Issue 557203002: Added core and modules to binding tests results for binding modularization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6
7 #include "config.h"
8 #include "V8TestInterface3.h"
9
10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/V8DOMConfiguration.h"
12 #include "bindings/core/v8/V8HiddenValue.h"
13 #include "bindings/core/v8/V8ObjectConstructor.h"
14 #include "bindings/tests/v8/V8Node.h"
15 #include "core/dom/ContextFeatures.h"
16 #include "core/dom/Document.h"
17 #include "platform/RuntimeEnabledFeatures.h"
18 #include "platform/TraceEvent.h"
19 #include "wtf/GetPtr.h"
20 #include "wtf/RefPtr.h"
21
22 namespace blink {
23
24 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterface3::domTemplate, V8TestInterface3::refObject, V8TestInterface3::d erefObject, V8TestInterface3::createPersistentHandle, 0, 0, V8TestInterface3::vi sitDOMWrapper, V8TestInterface3::installConditionallyEnabledMethods, V8TestInter face3::installConditionallyEnabledProperties, 0, WrapperTypeInfo::WrapperTypeObj ectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::Dependent, Wrappe rTypeInfo::RefCountedObject };
25
26 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac e3.h.
27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
28 // bindings/core/v8/ScriptWrappable.h.
29 const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra pperTypeInfo;
30
31 namespace TestInterface3V8Internal {
32
33 template <typename T> void V8_USE(T) { }
34
35 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info)
36 {
37 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
38 V8TestInterface3::indexedPropertyGetterCustom(index, info);
39 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
40 }
41
42 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
43 {
44 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
45 V8TestInterface3::indexedPropertySetterCustom(index, v8Value, info);
46 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
47 }
48
49 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCal lbackInfo<v8::Boolean>& info)
50 {
51 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMIndexedProperty");
52 V8TestInterface3::indexedPropertyDeleterCustom(index, info);
53 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
54 }
55
56 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::Pr opertyCallbackInfo<v8::Value>& info)
57 {
58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
59 V8TestInterface3::namedPropertyGetterCustom(name, info);
60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
61 }
62
63 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8 ::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
64 {
65 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
66 V8TestInterface3::namedPropertySetterCustom(name, v8Value, info);
67 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
68 }
69
70 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::Pro pertyCallbackInfo<v8::Integer>& info)
71 {
72 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
73 V8TestInterface3::namedPropertyQueryCustom(name, info);
74 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
75 }
76
77 static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::P ropertyCallbackInfo<v8::Boolean>& info)
78 {
79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
80 V8TestInterface3::namedPropertyDeleterCustom(name, info);
81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
82 }
83
84 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
85 {
86 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMNamedProperty");
87 V8TestInterface3::namedPropertyEnumeratorCustom(info);
88 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
89 }
90
91 } // namespace TestInterface3V8Internal
92
93 static void installV8TestInterface3Template(v8::Handle<v8::FunctionTemplate> fun ctionTemplate, v8::Isolate* isolate)
94 {
95 functionTemplate->ReadOnlyPrototype();
96
97 v8::Local<v8::Signature> defaultSignature;
98 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestInterface3", v8::Local<v8::FunctionTemplate>(), V8TestInterface3::inte rnalFieldCount,
99 0, 0,
100 0, 0,
101 0, 0,
102 isolate);
103 v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTempla te->InstanceTemplate();
104 v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTempl ate->PrototypeTemplate();
105 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestInterfac e3V8Internal::indexedPropertyGetterCallback, TestInterface3V8Internal::indexedPr opertySetterCallback, 0, TestInterface3V8Internal::indexedPropertyDeleterCallbac k, indexedPropertyEnumerator<TestInterface3>);
106 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterface3 V8Internal::namedPropertyGetterCallback, TestInterface3V8Internal::namedProperty SetterCallback, TestInterface3V8Internal::namedPropertyQueryCallback, TestInterf ace3V8Internal::namedPropertyDeleterCallback, TestInterface3V8Internal::namedPro pertyEnumeratorCallback);
107
108 // Custom toString template
109 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
110 }
111
112 v8::Handle<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isol ate)
113 {
114 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterface3Template);
115 }
116
117 bool V8TestInterface3::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* i solate)
118 {
119 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
120 }
121
122 v8::Handle<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Handle <v8::Value> v8Value, v8::Isolate* isolate)
123 {
124 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
125 }
126
127 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8:: Handle<v8::Value> value)
128 {
129 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle <v8::Object>::Cast(value))->toImpl<TestInterface3>() : 0;
130 }
131
132
133 void V8TestInterface3::refObject(ScriptWrappableBase* internalPointer)
134 {
135 internalPointer->toImpl<TestInterface3>()->ref();
136 }
137
138 void V8TestInterface3::derefObject(ScriptWrappableBase* internalPointer)
139 {
140 internalPointer->toImpl<TestInterface3>()->deref();
141 }
142
143 WrapperPersistentNode* V8TestInterface3::createPersistentHandle(ScriptWrappableB ase* internalPointer)
144 {
145 ASSERT_NOT_REACHED();
146 return 0;
147 }
148
149 template<>
150 v8::Handle<v8::Value> toV8NoInline(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
151 {
152 return toV8(impl, creationContext, isolate);
153 }
154
155 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface3.h ('k') | Source/bindings/tests/results/V8TestInterfaceCheckSecurity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698