2
This file is part of the WebKit open source project.
3
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
21
#ifndef V8TestEventTarget_h
22
#define V8TestEventTarget_h
24
#include "TestEventTarget.h"
25
#include "V8Binding.h"
26
#include "V8DOMWrapper.h"
27
#include "WrapperTypeInfo.h"
29
#include <wtf/HashMap.h>
30
#include <wtf/text/StringHash.h>
34
class V8TestEventTarget {
36
static const bool hasDependentLifetime = false;
37
static bool HasInstance(v8::Handle<v8::Value>);
38
static v8::Persistent<v8::FunctionTemplate> GetRawTemplate();
39
static v8::Persistent<v8::FunctionTemplate> GetTemplate();
40
static TestEventTarget* toNative(v8::Handle<v8::Object> object)
42
return reinterpret_cast<TestEventTarget*>(object->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex));
44
static void derefObject(void*);
45
static WrapperTypeInfo info;
46
static v8::Handle<v8::Value> indexedPropertyGetter(uint32_t, const v8::AccessorInfo&);
47
static v8::Handle<v8::Value> namedPropertyGetter(v8::Local<v8::String>, const v8::AccessorInfo&);
48
static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount + 0;
49
static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 1;
50
static void installPerContextProperties(v8::Handle<v8::Object>, TestEventTarget*) { }
51
static void installPerContextPrototypeProperties(v8::Handle<v8::Object>) { }
53
friend v8::Handle<v8::Object> wrap(TestEventTarget*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
54
static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestEventTarget>, v8::Handle<v8::Object> creationContext, v8::Isolate*);
58
inline v8::Handle<v8::Object> wrap(TestEventTarget* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate = 0)
61
ASSERT(DOMDataStore::current(isolate)->get(impl).IsEmpty());
62
return V8TestEventTarget::createWrapper(impl, creationContext, isolate);
65
inline v8::Handle<v8::Object> toV8Object(TestEventTarget* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
68
return v8::Handle<v8::Object>();
69
v8::Handle<v8::Object> wrapper = DOMDataStore::current(isolate)->get(impl);
70
if (!wrapper.IsEmpty())
72
return wrap(impl, creationContext, isolate);
75
inline v8::Handle<v8::Value> toV8(TestEventTarget* impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
78
return v8NullWithCheck(isolate);
79
v8::Handle<v8::Value> wrapper = DOMDataStore::current(isolate)->get(impl);
80
if (!wrapper.IsEmpty())
82
return wrap(impl, creationContext, isolate);
85
inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventTarget > impl, v8::Handle<v8::Object> creationContext = v8::Handle<v8::Object>(), v8::Isolate* isolate = 0)
87
return toV8(impl.get(), creationContext, isolate);
92
#endif // V8TestEventTarget_h