1 /* 2 This file is part of the WebKit open source project. 3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public License 16 along with this library; see the file COPYING.LIB. If not, write to 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 Boston, MA 02111-1307, USA. 19 */ 20 21 #if ENABLE(Condition1) || ENABLE(Condition2) 22 23 #ifndef V8TestSerializedScriptValueInterface_h 24 #define V8TestSerializedScriptValueInterface_h 25 26 #include "TestSerializedScriptValueInterface.h" 27 #include "V8DOMWrapper.h" 28 #include "WrapperTypeInfo.h" 29 #include <wtf/text/StringHash.h> 30 #include <v8.h> 31 #include <wtf/HashMap.h> 32 33 namespace WebCore { 34 35 class V8TestSerializedScriptValueInterface { 36 37 public: 38 static bool HasInstance(v8::Handle<v8::Value> value); 39 static v8::Persistent<v8::FunctionTemplate> GetRawTemplate(); 40 static v8::Persistent<v8::FunctionTemplate> GetTemplate(); toNative(v8::Handle<v8::Object> object)41 static TestSerializedScriptValueInterface* toNative(v8::Handle<v8::Object> object) 42 { 43 return reinterpret_cast<TestSerializedScriptValueInterface*>(object->GetPointerFromInternalField(v8DOMWrapperObjectIndex)); 44 } 45 inline static v8::Handle<v8::Object> wrap(TestSerializedScriptValueInterface*); 46 static void derefObject(void*); 47 static WrapperTypeInfo info; 48 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0; 49 private: 50 static v8::Handle<v8::Object> wrapSlow(TestSerializedScriptValueInterface*); 51 }; 52 53 wrap(TestSerializedScriptValueInterface * impl)54v8::Handle<v8::Object> V8TestSerializedScriptValueInterface::wrap(TestSerializedScriptValueInterface* impl) 55 { 56 v8::Handle<v8::Object> wrapper = getDOMObjectMap().get(impl); 57 if (!wrapper.IsEmpty()) 58 return wrapper; 59 return V8TestSerializedScriptValueInterface::wrapSlow(impl); 60 } 61 toV8(TestSerializedScriptValueInterface * impl)62inline v8::Handle<v8::Value> toV8(TestSerializedScriptValueInterface* impl) 63 { 64 if (!impl) 65 return v8::Null(); 66 return V8TestSerializedScriptValueInterface::wrap(impl); 67 } toV8(PassRefPtr<TestSerializedScriptValueInterface> impl)68inline v8::Handle<v8::Value> toV8(PassRefPtr< TestSerializedScriptValueInterface > impl) 69 { 70 return toV8(impl.get()); 71 } 72 } 73 74 #endif // V8TestSerializedScriptValueInterface_h 75 #endif // ENABLE(Condition1) || ENABLE(Condition2) 76 77