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 %} | |
173 {% if method.overloads and method.overloads.partial_overloads %} | |
haraken
2014/10/09 04:24:01
partial_overloads => has_partial_overloads
tasak
2014/10/10 07:52:23
Done.
| |
174 static void register{{method.name | blink_capitalize}}MethodForPartialInterf ace(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | |
175 {% endif %} | |
176 {% endfor %} | |
177 {% endif %} | |
165 {% if not has_custom_to_v8 and not is_script_wrappable %} | 178 {% if not has_custom_to_v8 and not is_script_wrappable %} |
166 | 179 |
167 private: | 180 private: |
168 friend v8::Handle<v8::Object> wrap({{cpp_class}}*, v8::Handle<v8::Object> cr eationContext, v8::Isolate*); | 181 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*); | 182 static v8::Handle<v8::Object> createWrapper({{pass_cpp_type}}, v8::Handle<v8 ::Object> creationContext, v8::Isolate*); |
170 {% endif %} | 183 {% endif %} |
184 {% if has_partial_interface %} | |
185 | |
186 private: | |
187 static InstallTemplateFunction install{{v8_class}}TemplateFunction; | |
188 {% endif %} | |
171 }; | 189 }; |
172 | 190 |
173 {% if has_custom_to_v8 %} | 191 {% if has_custom_to_v8 %} |
174 class {{cpp_class}}; | 192 class {{cpp_class}}; |
175 v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContex t, v8::Isolate*); | 193 v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContex t, v8::Isolate*); |
176 | 194 |
177 template<class CallbackInfo> | 195 template<class CallbackInfo> |
178 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* im pl) | 196 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* im pl) |
179 { | 197 { |
180 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate())); | 198 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate())); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
281 } | 299 } |
282 | 300 |
283 {% if has_event_constructor %} | 301 {% if has_event_constructor %} |
284 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); | 302 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); |
285 | 303 |
286 {% endif %} | 304 {% endif %} |
287 } // namespace blink | 305 } // namespace blink |
288 {% endfilter %} | 306 {% endfilter %} |
289 | 307 |
290 #endif // {{v8_class}}_h | 308 #endif // {{v8_class}}_h |
OLD | NEW |