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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceDocument.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 "V8TestInterfaceDocument.h"
9
10 #include "bindings/core/v8/ExceptionState.h"
11 #include "bindings/core/v8/ScriptController.h"
12 #include "bindings/core/v8/V8DOMConfiguration.h"
13 #include "bindings/core/v8/V8HiddenValue.h"
14 #include "bindings/core/v8/V8ObjectConstructor.h"
15 #include "bindings/core/v8/WindowProxy.h"
16 #include "core/dom/ContextFeatures.h"
17 #include "core/dom/Document.h"
18 #include "core/frame/LocalFrame.h"
19 #include "platform/RuntimeEnabledFeatures.h"
20 #include "platform/TraceEvent.h"
21 #include "wtf/GetPtr.h"
22 #include "wtf/RefPtr.h"
23
24 namespace blink {
25
26 const WrapperTypeInfo V8TestInterfaceDocument::wrapperTypeInfo = { gin::kEmbedde rBlink, V8TestInterfaceDocument::domTemplate, V8TestInterfaceDocument::refObject , V8TestInterfaceDocument::derefObject, V8TestInterfaceDocument::createPersisten tHandle, 0, V8TestInterfaceDocument::toEventTarget, 0, V8TestInterfaceDocument:: installConditionallyEnabledMethods, V8TestInterfaceDocument::installConditionall yEnabledProperties, &V8Document::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeOb jectPrototype, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::Dependent, Wrapper TypeInfo::WillBeGarbageCollectedObject };
27
28 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eDocument.h.
29 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
30 // bindings/core/v8/ScriptWrappable.h.
31 const WrapperTypeInfo& TestInterfaceDocument::s_wrapperTypeInfo = V8TestInterfac eDocument::wrapperTypeInfo;
32
33 namespace TestInterfaceDocumentV8Internal {
34
35 template <typename T> void V8_USE(T) { }
36
37 } // namespace TestInterfaceDocumentV8Internal
38
39 static void installV8TestInterfaceDocumentTemplate(v8::Handle<v8::FunctionTempla te> functionTemplate, v8::Isolate* isolate)
40 {
41 functionTemplate->ReadOnlyPrototype();
42
43 v8::Local<v8::Signature> defaultSignature;
44 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl ate, "TestInterfaceDocument", V8Document::domTemplate(isolate), V8TestInterfaceD ocument::internalFieldCount,
45 0, 0,
46 0, 0,
47 0, 0,
48 isolate);
49 v8::Local<v8::ObjectTemplate> instanceTemplate ALLOW_UNUSED = functionTempla te->InstanceTemplate();
50 v8::Local<v8::ObjectTemplate> prototypeTemplate ALLOW_UNUSED = functionTempl ate->PrototypeTemplate();
51
52 // Custom toString template
53 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
54 }
55
56 v8::Handle<v8::FunctionTemplate> V8TestInterfaceDocument::domTemplate(v8::Isolat e* isolate)
57 {
58 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceDocumentTemplate);
59 }
60
61 bool V8TestInterfaceDocument::hasInstance(v8::Handle<v8::Value> v8Value, v8::Iso late* isolate)
62 {
63 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
64 }
65
66 v8::Handle<v8::Object> V8TestInterfaceDocument::findInstanceInPrototypeChain(v8: :Handle<v8::Value> v8Value, v8::Isolate* isolate)
67 {
68 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
69 }
70
71 TestInterfaceDocument* V8TestInterfaceDocument::toImplWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
72 {
73 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle <v8::Object>::Cast(value))->toImpl<TestInterfaceDocument>() : 0;
74 }
75
76 EventTarget* V8TestInterfaceDocument::toEventTarget(v8::Handle<v8::Object> objec t)
77 {
78 return toImpl(object);
79 }
80
81
82 void V8TestInterfaceDocument::refObject(ScriptWrappableBase* internalPointer)
83 {
84 #if !ENABLE(OILPAN)
85 internalPointer->toImpl<TestInterfaceDocument>()->ref();
86 #endif
87 }
88
89 void V8TestInterfaceDocument::derefObject(ScriptWrappableBase* internalPointer)
90 {
91 #if !ENABLE(OILPAN)
92 internalPointer->toImpl<TestInterfaceDocument>()->deref();
93 #endif
94 }
95
96 WrapperPersistentNode* V8TestInterfaceDocument::createPersistentHandle(ScriptWra ppableBase* internalPointer)
97 {
98 #if ENABLE(OILPAN)
99 return WrapperPersistent<TestInterfaceDocument>::create(internalPointer->toI mpl<TestInterfaceDocument>());
100 #else
101 ASSERT_NOT_REACHED();
102 return 0;
103 #endif
104 }
105
106 template<>
107 v8::Handle<v8::Value> toV8NoInline(TestInterfaceDocument* impl, v8::Handle<v8::O bject> creationContext, v8::Isolate* isolate)
108 {
109 return toV8(impl, creationContext, isolate);
110 }
111
112 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceDocument.h ('k') | Source/bindings/tests/results/V8TestInterfaceEmpty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698