OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! | 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! |
6 | 6 |
7 #ifndef {{v8_class}}_h | 7 #ifndef {{v8_class}}_h |
8 #define {{v8_class}}_h | 8 #define {{v8_class}}_h |
9 | 9 |
10 {% filter conditional(conditional_string) %} | 10 {% filter conditional(conditional_string) %} |
(...skipping 27 matching lines...) Expand all Loading... |
38 {% if not attribute.is_read_only %} | 38 {% if not attribute.is_read_only %} |
39 static bool {{attribute.name}}AttributeSetter(LocalFrame* frame, {{cpp_c
lass}}* holderImpl, {{attribute.argument_cpp_type}} cppValue); | 39 static bool {{attribute.name}}AttributeSetter(LocalFrame* frame, {{cpp_c
lass}}* holderImpl, {{attribute.argument_cpp_type}} cppValue); |
40 {% endif %} | 40 {% endif %} |
41 {% endfor %} | 41 {% endfor %} |
42 }; | 42 }; |
43 | 43 |
44 {% endif %} | 44 {% endif %} |
45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); | 45 static bool hasInstance(v8::Handle<v8::Value>, v8::Isolate*); |
46 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); | 46 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va
lue>, v8::Isolate*); |
47 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); | 47 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); |
48 static {{cpp_class}}* toNative(v8::Handle<v8::Object> object) | 48 static {{cpp_class}}* toImpl(v8::Handle<v8::Object> object) |
49 { | 49 { |
50 return fromInternalPointer(blink::toInternalPointer(object)); | 50 return toImpl(blink::toScriptWrappableBase(object)); |
51 } | 51 } |
52 static {{cpp_class}}* toNativeWithTypeCheck(v8::Isolate*, v8::Handle<v8::Val
ue>); | 52 static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value
>); |
53 static const WrapperTypeInfo wrapperTypeInfo; | 53 static const WrapperTypeInfo wrapperTypeInfo; |
54 static void refObject(ScriptWrappableBase* internalPointer); | 54 static void refObject(ScriptWrappableBase* internalPointer); |
55 static void derefObject(ScriptWrappableBase* internalPointer); | 55 static void derefObject(ScriptWrappableBase* internalPointer); |
56 static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* in
ternalPointer); | 56 static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* in
ternalPointer); |
57 {% if has_visit_dom_wrapper %} | 57 {% if has_visit_dom_wrapper %} |
58 static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::
Persistent<v8::Object>&, v8::Isolate*); | 58 static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::
Persistent<v8::Object>&, v8::Isolate*); |
59 {% endif %} | 59 {% endif %} |
60 {% if is_active_dom_object %} | 60 {% if is_active_dom_object %} |
61 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); | 61 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); |
62 {% endif %} | 62 {% endif %} |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 #if ENABLE(OILPAN) | 141 #if ENABLE(OILPAN) |
142 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount
+ {{custom_internal_field_counter}}; | 142 static const int persistentHandleIndex = v8DefaultWrapperInternalFieldCount
+ {{custom_internal_field_counter}}; |
143 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}} + 1; | 143 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}} + 1; |
144 #else | 144 #else |
145 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; | 145 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; |
146 #endif | 146 #endif |
147 {% elif gc_type == 'RefCountedObject' %} | 147 {% elif gc_type == 'RefCountedObject' %} |
148 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; | 148 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {
{custom_internal_field_counter}}; |
149 {% endif %} | 149 {% endif %} |
150 {# End custom internal fields #} | 150 {# End custom internal fields #} |
151 static inline ScriptWrappableBase* toInternalPointer({{cpp_class}}* impl) | 151 static inline ScriptWrappableBase* toScriptWrappableBase({{cpp_class}}* impl
) |
152 { | 152 { |
153 return impl->toInternalPointer(); | 153 return impl->toScriptWrappableBase(); |
154 } | 154 } |
155 | 155 |
156 static inline {{cpp_class}}* fromInternalPointer(ScriptWrappableBase* intern
alPointer) | 156 static inline {{cpp_class}}* toImpl(ScriptWrappableBase* internalPointer) |
157 { | 157 { |
158 return ScriptWrappableBase::fromInternalPointer<{{cpp_class}}>(internalP
ointer); | 158 return internalPointer->toImpl<{{cpp_class}}>(); |
159 } | 159 } |
160 {% if interface_name == 'Window' %} | 160 {% if interface_name == 'Window' %} |
161 static bool namedSecurityCheckCustom(v8::Local<v8::Object> host, v8::Local<v
8::Value> key, v8::AccessType, v8::Local<v8::Value> data); | 161 static bool namedSecurityCheckCustom(v8::Local<v8::Object> host, v8::Local<v
8::Value> key, v8::AccessType, v8::Local<v8::Value> data); |
162 static bool indexedSecurityCheckCustom(v8::Local<v8::Object> host, uint32_t
index, v8::AccessType, v8::Local<v8::Value> data); | 162 static bool indexedSecurityCheckCustom(v8::Local<v8::Object> host, uint32_t
index, v8::AccessType, v8::Local<v8::Value> data); |
163 {% endif %} | 163 {% endif %} |
164 static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8
::Isolate*){% if has_conditional_attributes %}; | 164 static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8
::Isolate*){% if has_conditional_attributes %}; |
165 {% else %} { } | 165 {% else %} { } |
166 {% endif %} | 166 {% endif %} |
167 static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::I
solate*){% if conditionally_enabled_methods %}; | 167 static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::I
solate*){% if conditionally_enabled_methods %}; |
168 {% else %} { } | 168 {% else %} { } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); | 285 v8SetReturnValueFast(callbackInfo, impl.get(), wrappable); |
286 } | 286 } |
287 | 287 |
288 {% if has_event_constructor %} | 288 {% if has_event_constructor %} |
289 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta
te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); | 289 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta
te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); |
290 | 290 |
291 {% endif %} | 291 {% endif %} |
292 } // namespace blink | 292 } // namespace blink |
293 {% endfilter %} | 293 {% endfilter %} |
294 #endif // {{v8_class}}_h | 294 #endif // {{v8_class}}_h |
OLD | NEW |