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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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}}* toImpl(v8::Handle<v8::Object> object) | 48 static {{cpp_class}}* toImpl(v8::Handle<v8::Object> object) |
49 { | 49 { |
50 return blink::toScriptWrappableBase(object)->toImpl<{{cpp_class}}>(); | 50 return blink::toScriptWrappableBase(object)->toImpl<{{cpp_class}}>(); |
51 } | 51 } |
52 static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value
>); | 52 static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value
>); |
| 53 {% if has_partial_interface %} |
| 54 static WrapperTypeInfo wrapperTypeInfo; |
| 55 {% else %} |
53 static const WrapperTypeInfo wrapperTypeInfo; | 56 static const WrapperTypeInfo wrapperTypeInfo; |
| 57 {% endif %} |
54 static void refObject(ScriptWrappableBase* internalPointer); | 58 static void refObject(ScriptWrappableBase* internalPointer); |
55 static void derefObject(ScriptWrappableBase* internalPointer); | 59 static void derefObject(ScriptWrappableBase* internalPointer); |
56 static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* in
ternalPointer); | 60 static WrapperPersistentNode* createPersistentHandle(ScriptWrappableBase* in
ternalPointer); |
57 {% if has_visit_dom_wrapper %} | 61 {% if has_visit_dom_wrapper %} |
58 static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::
Persistent<v8::Object>&, v8::Isolate*); | 62 static void visitDOMWrapper(ScriptWrappableBase* internalPointer, const v8::
Persistent<v8::Object>&, v8::Isolate*); |
59 {% endif %} | 63 {% endif %} |
60 {% if is_active_dom_object %} | 64 {% if is_active_dom_object %} |
61 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); | 65 static ActiveDOMObject* toActiveDOMObject(v8::Handle<v8::Object>); |
62 {% endif %} | 66 {% endif %} |
63 {% if is_event_target %} | 67 {% if is_event_target %} |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 {% if interface_name == 'Window' %} | 159 {% if interface_name == 'Window' %} |
156 static bool namedSecurityCheckCustom(v8::Local<v8::Object> host, v8::Local<v
8::Value> key, v8::AccessType, v8::Local<v8::Value> data); | 160 static bool namedSecurityCheckCustom(v8::Local<v8::Object> host, v8::Local<v
8::Value> key, v8::AccessType, v8::Local<v8::Value> data); |
157 static bool indexedSecurityCheckCustom(v8::Local<v8::Object> host, uint32_t
index, v8::AccessType, v8::Local<v8::Value> data); | 161 static bool indexedSecurityCheckCustom(v8::Local<v8::Object> host, uint32_t
index, v8::AccessType, v8::Local<v8::Value> data); |
158 {% endif %} | 162 {% endif %} |
159 static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8
::Isolate*){% if has_conditional_attributes %}; | 163 static void installConditionallyEnabledProperties(v8::Handle<v8::Object>, v8
::Isolate*){% if has_conditional_attributes %}; |
160 {% else %} { } | 164 {% else %} { } |
161 {% endif %} | 165 {% endif %} |
162 static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::I
solate*){% if conditionally_enabled_methods %}; | 166 static void installConditionallyEnabledMethods(v8::Handle<v8::Object>, v8::I
solate*){% if conditionally_enabled_methods %}; |
163 {% else %} { } | 167 {% else %} { } |
164 {% endif %} | 168 {% endif %} |
| 169 {% if has_partial_interface %} |
| 170 static void updateWrapperTypeInfo(InstallTemplateFunction, InstallConditiona
llyEnabledMethodsFunction); |
| 171 static void install{{v8_class}}Template(v8::Handle<v8::FunctionTemplate>, v8
::Isolate*); |
| 172 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} |
| 173 static void register{{method.name | blink_capitalize}}MethodForPartialInterf
ace(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
| 174 {% endfor %} |
| 175 {% endif %} |
165 {% if not has_custom_to_v8 and not is_script_wrappable %} | 176 {% if not has_custom_to_v8 and not is_script_wrappable %} |
166 | 177 |
167 private: | 178 private: |
168 friend v8::Handle<v8::Object> wrap({{cpp_class}}*, v8::Handle<v8::Object> cr
eationContext, v8::Isolate*); | 179 friend v8::Handle<v8::Object> wrap({{cpp_class}}*, v8::Handle<v8::Object> cr
eationContext, v8::Isolate*); |
169 static v8::Handle<v8::Object> createWrapper({{pass_cpp_type}}, v8::Handle<v8
::Object> creationContext, v8::Isolate*); | 180 static v8::Handle<v8::Object> createWrapper({{pass_cpp_type}}, v8::Handle<v8
::Object> creationContext, v8::Isolate*); |
170 {% endif %} | 181 {% endif %} |
| 182 {% if has_partial_interface %} |
| 183 |
| 184 private: |
| 185 static InstallTemplateFunction install{{v8_class}}TemplateFunction; |
| 186 {% endif %} |
171 }; | 187 }; |
172 | 188 |
173 {% if has_custom_to_v8 %} | 189 {% if has_custom_to_v8 %} |
174 class {{cpp_class}}; | 190 class {{cpp_class}}; |
175 v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContex
t, v8::Isolate*); | 191 v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContex
t, v8::Isolate*); |
176 | 192 |
177 template<class CallbackInfo> | 193 template<class CallbackInfo> |
178 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* im
pl) | 194 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* im
pl) |
179 { | 195 { |
180 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); | 196 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf
o.GetIsolate())); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 } | 297 } |
282 | 298 |
283 {% if has_event_constructor %} | 299 {% if has_event_constructor %} |
284 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta
te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); | 300 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta
te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); |
285 | 301 |
286 {% endif %} | 302 {% endif %} |
287 } // namespace blink | 303 } // namespace blink |
288 {% endfilter %} | 304 {% endfilter %} |
289 | 305 |
290 #endif // {{v8_class}}_h | 306 #endif // {{v8_class}}_h |
OLD | NEW |