| // Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| |
| #ifndef V8TestInterface_h |
| #define V8TestInterface_h |
| |
| #if ENABLE(CONDITION) |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "bindings/core/v8/V8Binding.h" |
| #include "bindings/core/v8/V8DOMWrapper.h" |
| #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
| #include "bindings/core/v8/WrapperTypeInfo.h" |
| #include "bindings/tests/idls/core/TestInterfaceImplementation.h" |
| #include "platform/heap/Handle.h" |
| |
| namespace blink { |
| |
| class V8TestInterface { |
| public: |
| class PrivateScript { |
| public: |
| static bool shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result); |
| static bool stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result); |
| static bool stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue); |
| }; |
| |
| static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
| static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Value>, v8::Isolate*); |
| static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
| static TestInterfaceImplementation* toImpl(v8::Handle<v8::Object> object) |
| { |
| return blink::toScriptWrappableBase(object)->toImpl<TestInterfaceImplementation>(); |
| } |
| static TestInterfaceImplementation* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value>); |
| static WrapperTypeInfo wrapperTypeInfo; |
| static void refObject(ScriptWrappableBase*); |
| static void derefObject(ScriptWrappableBase*); |
| static void trace(Visitor* visitor, ScriptWrappableBase* scriptWrappableBase) |
| { |
| } |
| static void visitDOMWrapper(v8::Isolate*, ScriptWrappableBase*, const v8::Persistent<v8::Object>&); |
| static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); |
| static void implementsCustomVoidMethodMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&); |
| static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); |
| static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; |
| static inline ScriptWrappableBase* toScriptWrappableBase(TestInterfaceImplementation* impl) |
| { |
| return impl->toScriptWrappableBase(); |
| } |
| static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8::Isolate*); |
| static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::Isolate*); |
| static void updateWrapperTypeInfo(InstallTemplateFunction, InstallConditionallyEnabledMethodsFunction); |
| static void installV8TestInterfaceTemplate(v8::Handle<v8::FunctionTemplate>, v8::Isolate*); |
| static void registerVoidMethodPartialOverloadMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| static void registerStaticVoidMethodPartialOverloadMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| static void registerPromiseMethodPartialOverloadMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| static void registerStaticPromiseMethodPartialOverloadMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| static void registerPartial2VoidMethodMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| static void registerPartial2StaticVoidMethodMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| |
| private: |
| static InstallTemplateFunction installV8TestInterfaceTemplateFunction; |
| }; |
| |
| v8::Handle<v8::Value> toV8(TestInterfaceImplementation*, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
| |
| template<typename CallbackInfo> |
| inline void v8SetReturnValue(const CallbackInfo& callbackInfo, TestInterfaceImplementation* impl) |
| { |
| v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); |
| } |
| |
| template<typename CallbackInfo> |
| inline void v8SetReturnValueForMainWorld(const CallbackInfo& callbackInfo, TestInterfaceImplementation* impl) |
| { |
| v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); |
| } |
| |
| template<typename CallbackInfo> |
| inline void v8SetReturnValueFast(const CallbackInfo& callbackInfo, TestInterfaceImplementation* impl, const ScriptWrappable*) |
| { |
| v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInfo.GetIsolate())); |
| } |
| |
| } // namespace blink |
| #endif // ENABLE(CONDITION) |
| |
| #endif // V8TestInterface_h |