Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / tests / results / modules / V8TestInterface5.h
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 #ifndef V8TestInterface5_h
8 #define V8TestInterface5_h
9
10 #if ENABLE(CONDITION)
11 #include "bindings/core/v8/ScriptWrappable.h"
12 #include "bindings/core/v8/V8Binding.h"
13 #include "bindings/core/v8/V8DOMWrapper.h"
14 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
15 #include "bindings/core/v8/WrapperTypeInfo.h"
16 #include "bindings/tests/idls/modules/TestInterface5Implementation.h"
17 #include "platform/heap/Handle.h"
18
19 namespace blink {
20
21 class V8TestInterface5 {
22 public:
23     static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*);
24     static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Value>, v8::Isolate*);
25     static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
26     static TestInterface5Implementation* toImpl(v8::Handle<v8::Object> object)
27     {
28         return toImpl(blink::toScriptWrappableBase(object));
29     }
30     static TestInterface5Implementation* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>);
31     static const WrapperTypeInfo wrapperTypeInfo;
32     static void refObject(ScriptWrappableBase* internalPointer);
33     static void derefObject(ScriptWrappableBase* internalPointer);
34     static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* internalPointer);
35     static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::Persistent<v8::Object>&, v8::Isolate*);
36     static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>);
37     static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&);
38     static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0;
39     static inline ScriptWrappableBase* toScriptWrappableBase(TestInterface5Implementation* impl)
40     {
41         return impl->toScriptWrappableBase();
42     }
43
44     static inline TestInterface5Implementation* toImpl(ScriptWrappableBase* internalPointer)
45     {
46         return internalPointer->toImpl<TestInterface5Implementation>();
47     }
48     static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8::Isolate*);
49     static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*);
50
51 private:
52 };
53
54 class TestInterface5Implementation;
55 v8::Handle<v8::Value> toV8(TestInterface5Implementation*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
56
57 template<class CallbackInfo>
58 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl)
59 {
60     v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
61 }
62
63 template<class CallbackInfo>
64 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl)
65 {
66      v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
67 }
68
69 template<class CallbackInfo, class Wrappable>
70 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterface5Implementation* impl, Wrappable*)
71 {
72      v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate()));
73 }
74
75 inline v8::Handle<v8::Value> toV8(PassRefPtr<TestInterface5Implementation> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
76 {
77     return toV8(impl.get(), creationContext, isolate);
78 }
79
80 template<class CallbackInfo>
81 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface5Implementation> impl)
82 {
83     v8SetReturnValue(callbackInfo, impl.get());
84 }
85
86 template<class CallbackInfo>
87 inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface5Implementation> impl)
88 {
89     v8SetReturnValueForMainWorld(callbackInfo, impl.get());
90 }
91
92 template<class CallbackInfo, class Wrappable>
93 inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, PassRefPtr<TestInterface5Implementation> impl, Wrappable* wrappable)
94 {
95     v8SetReturnValueFast(callbackInfo, impl.get(), wrappable);
96 }
97
98 } // namespace blink
99 #endif // ENABLE(CONDITION)
100 #endif // V8TestInterface5_h