Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: Source/bindings/templates/interface.h

Issue 618373003: [bindings] partial interfaces should not violate componentization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed patch conflict Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 static {{cpp_class}}* toImpl(v8::Handle<v8::Object> object); 47 static {{cpp_class}}* toImpl(v8::Handle<v8::Object> object);
48 {% else %} 48 {% else %}
49 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*); 49 static v8::Handle<v8::Object> findInstanceInPrototypeChain(v8::Handle<v8::Va lue>, v8::Isolate*);
50 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*); 50 static v8::Handle<v8::FunctionTemplate> domTemplate(v8::Isolate*);
51 static {{cpp_class}}* toImpl(v8::Handle<v8::Object> object) 51 static {{cpp_class}}* toImpl(v8::Handle<v8::Object> object)
52 { 52 {
53 return blink::toScriptWrappableBase(object)->toImpl<{{cpp_class}}>(); 53 return blink::toScriptWrappableBase(object)->toImpl<{{cpp_class}}>();
54 } 54 }
55 {% endif %} 55 {% endif %}
56 static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value >); 56 static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Handle<v8::Value >);
57 {% if has_partial_interface %}
58 static WrapperTypeInfo wrapperTypeInfo;
59 {% else %}
57 static const WrapperTypeInfo wrapperTypeInfo; 60 static const WrapperTypeInfo wrapperTypeInfo;
61 {% endif %}
58 static void refObject(ScriptWrappableBase*); 62 static void refObject(ScriptWrappableBase*);
59 static void derefObject(ScriptWrappableBase*); 63 static void derefObject(ScriptWrappableBase*);
60 static void trace(Visitor* visitor, ScriptWrappableBase* scriptWrappableBase ) 64 static void trace(Visitor* visitor, ScriptWrappableBase* scriptWrappableBase )
61 { 65 {
62 {% if gc_type == 'GarbageCollectedObject' %} 66 {% if gc_type == 'GarbageCollectedObject' %}
63 visitor->trace(scriptWrappableBase->toImpl<{{cpp_class}}>()); 67 visitor->trace(scriptWrappableBase->toImpl<{{cpp_class}}>());
64 {% elif gc_type == 'WillBeGarbageCollectedObject' %} 68 {% elif gc_type == 'WillBeGarbageCollectedObject' %}
65 #if ENABLE(OILPAN) 69 #if ENABLE(OILPAN)
66 visitor->trace(scriptWrappableBase->toImpl<{{cpp_class}}>()); 70 visitor->trace(scriptWrappableBase->toImpl<{{cpp_class}}>());
67 #endif 71 #endif
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 {% if interface_name == 'Window' %} 160 {% if interface_name == 'Window' %}
157 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);
158 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);
159 {% endif %} 163 {% endif %}
160 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 %};
161 {% else %} { } 165 {% else %} { }
162 {% endif %} 166 {% endif %}
163 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 %};
164 {% else %} { } 168 {% else %} { }
165 {% endif %} 169 {% endif %}
170 {% if has_partial_interface %}
171 static void updateWrapperTypeInfo(InstallTemplateFunction, InstallConditiona llyEnabledMethodsFunction);
172 static void install{{v8_class}}Template(v8::Handle<v8::FunctionTemplate>, v8 ::Isolate*);
173 {% for method in methods if method.overloads and method.overloads.has_partia l_overloads %}
174 static void register{{method.name | blink_capitalize}}MethodForPartialInterf ace(void (*)(const v8::FunctionCallbackInfo<v8::Value>&));
175 {% endfor %}
176 {% endif %}
166 {% if not has_custom_to_v8 and not is_script_wrappable %} 177 {% if not has_custom_to_v8 and not is_script_wrappable %}
167 178
168 private: 179 private:
169 friend v8::Handle<v8::Object> wrap({{cpp_class}}*, v8::Handle<v8::Object> cr eationContext, v8::Isolate*); 180 friend v8::Handle<v8::Object> wrap({{cpp_class}}*, v8::Handle<v8::Object> cr eationContext, v8::Isolate*);
170 static v8::Handle<v8::Object> createWrapper({{pass_cpp_type}}, v8::Handle<v8 ::Object> creationContext, v8::Isolate*); 181 static v8::Handle<v8::Object> createWrapper({{pass_cpp_type}}, v8::Handle<v8 ::Object> creationContext, v8::Isolate*);
171 {% endif %} 182 {% endif %}
183 {% if has_partial_interface %}
184
185 private:
186 static InstallTemplateFunction install{{v8_class}}TemplateFunction;
187 {% endif %}
172 }; 188 };
173 189
174 {% if has_custom_to_v8 %} 190 {% if has_custom_to_v8 %}
175 class {{cpp_class}}; 191 class {{cpp_class}};
176 v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContex t, v8::Isolate*); 192 v8::Handle<v8::Value> toV8({{cpp_class}}*, v8::Handle<v8::Object> creationContex t, v8::Isolate*);
177 193
178 template<class CallbackInfo> 194 template<class CallbackInfo>
179 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* im pl) 195 inline void v8SetReturnValue(const CallbackInfo& callbackInfo, {{cpp_class}}* im pl)
180 { 196 {
181 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate())); 197 v8SetReturnValue(callbackInfo, toV8(impl, callbackInfo.Holder(), callbackInf o.GetIsolate()));
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 298 }
283 299
284 {% if has_event_constructor %} 300 {% if has_event_constructor %}
285 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = ""); 301 bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&, ExceptionSta te&, const v8::FunctionCallbackInfo<v8::Value>& info, const String& = "");
286 302
287 {% endif %} 303 {% endif %}
288 } // namespace blink 304 } // namespace blink
289 {% endfilter %} 305 {% endfilter %}
290 306
291 #endif // {{v8_class}}_h 307 #endif // {{v8_class}}_h
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698