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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface.h.tmpl

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: Rebasing the fixes... Created 3 years, 10 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
OLDNEW
1 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 #ifndef {{v8_class}}_h 4 #ifndef {{v8_class}}_h
5 #define {{v8_class}}_h 5 #define {{v8_class}}_h
6 6
7 {% for filename in header_includes %} 7 {% for filename in header_includes %}
8 #include "{{filename}}" 8 #include "{{filename}}"
9 {% endfor %} 9 {% endfor %}
10 10
(...skipping 20 matching lines...) Expand all
31 {% if is_array_buffer_or_view %} 31 {% if is_array_buffer_or_view %}
32 {{exported}}static {{cpp_class}}* toImpl(v8::Local<v8::Object> object); 32 {{exported}}static {{cpp_class}}* toImpl(v8::Local<v8::Object> object);
33 {% else %} 33 {% else %}
34 {{exported}}static bool hasInstance(v8::Local<v8::Value>, v8::Isolate*); 34 {{exported}}static bool hasInstance(v8::Local<v8::Value>, v8::Isolate*);
35 static v8::Local<v8::Object> findInstanceInPrototypeChain(v8::Local<v8::Value> , v8::Isolate*); 35 static v8::Local<v8::Object> findInstanceInPrototypeChain(v8::Local<v8::Value> , v8::Isolate*);
36 {{exported}}static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, c onst DOMWrapperWorld&); 36 {{exported}}static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, c onst DOMWrapperWorld&);
37 {% if has_named_properties_object %} 37 {% if has_named_properties_object %}
38 {{exported}}static v8::Local<v8::FunctionTemplate> domTemplateForNamedProperti esObject(v8::Isolate*, const DOMWrapperWorld&); 38 {{exported}}static v8::Local<v8::FunctionTemplate> domTemplateForNamedProperti esObject(v8::Isolate*, const DOMWrapperWorld&);
39 {% endif %} 39 {% endif %}
40 static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) { 40 static {{cpp_class}}* toImpl(v8::Local<v8::Object> object) {
41 return toScriptWrappable(object)->toImpl<{{cpp_class}}>(); 41 return ToScriptWrappable(object)->ToImpl<{{cpp_class}}>();
42 } 42 }
43 {% endif %} 43 {% endif %}
44 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local< v8::Value>); 44 {{exported}}static {{cpp_class}}* toImplWithTypeCheck(v8::Isolate*, v8::Local< v8::Value>);
45 {% if has_partial_interface %} 45 {% if has_partial_interface %}
46 {{exported}}static WrapperTypeInfo wrapperTypeInfo; 46 {{exported}}static WrapperTypeInfo wrapperTypeInfo;
47 {% else %} 47 {% else %}
48 {{exported}}static const WrapperTypeInfo wrapperTypeInfo; 48 {{exported}}static const WrapperTypeInfo wrapperTypeInfo;
49 {% endif %} 49 {% endif %}
50 static void trace(Visitor* visitor, ScriptWrappable* scriptWrappable) { 50 static void Trace(Visitor* visitor, ScriptWrappable* scriptWrappable) {
51 visitor->trace(scriptWrappable->toImpl<{{cpp_class}}>()); 51 visitor->Trace(scriptWrappable->ToImpl<{{cpp_class}}>());
52 } 52 }
53 static void traceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrap pable) { 53 static void TraceWrappers(WrapperVisitor* visitor, ScriptWrappable* scriptWrap pable) {
54 visitor->traceWrappers(scriptWrappable->toImpl<{{cpp_class}}>()); 54 visitor->TraceWrappers(scriptWrappable->ToImpl<{{cpp_class}}>());
55 } 55 }
56 {% for method in methods %} 56 {% for method in methods %}
57 {% if method.is_custom %} 57 {% if method.is_custom %}
58 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::Val ue>&); 58 static void {{method.name}}MethodCustom(const v8::FunctionCallbackInfo<v8::Val ue>&);
59 {% endif %} 59 {% endif %}
60 {% if method.is_custom_call_prologue %} 60 {% if method.is_custom_call_prologue %}
61 static void {{method.name}}MethodPrologueCustom(const v8::FunctionCallbackInfo <v8::Value>&, {{cpp_class}}*); 61 static void {{method.name}}MethodPrologueCustom(const v8::FunctionCallbackInfo <v8::Value>&, {{cpp_class}}*);
62 {% endif %} 62 {% endif %}
63 {% if method.is_custom_call_epilogue %} 63 {% if method.is_custom_call_epilogue %}
64 static void {{method.name}}MethodEpilogueCustom(const v8::FunctionCallbackInfo <v8::Value>&, {{cpp_class}}*); 64 static void {{method.name}}MethodEpilogueCustom(const v8::FunctionCallbackInfo <v8::Value>&, {{cpp_class}}*);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::A rray>&); 112 static void namedPropertyEnumeratorCustom(const v8::PropertyCallbackInfo<v8::A rray>&);
113 {% endif %} 113 {% endif %}
114 {# END custom special operations #} 114 {# END custom special operations #}
115 {% if has_custom_legacy_call_as_function %} 115 {% if has_custom_legacy_call_as_function %}
116 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&); 116 static void legacyCallCustom(const v8::FunctionCallbackInfo<v8::Value>&);
117 {% endif %} 117 {% endif %}
118 {# Custom internal fields #} 118 {# Custom internal fields #}
119 {% set custom_internal_field_counter = 0 %} 119 {% set custom_internal_field_counter = 0 %}
120 {% if is_event_target and not is_node %} 120 {% if is_event_target and not is_node %}
121 {# Event listeners on DOM nodes are explicitly supported in the GC controller. #} 121 {# Event listeners on DOM nodes are explicitly supported in the GC controller. #}
122 static const int eventListenerCacheIndex = v8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}}; 122 static const int eventListenerCacheIndex = kV8DefaultWrapperInternalFieldCount + {{custom_internal_field_counter}};
123 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %} 123 {% set custom_internal_field_counter = custom_internal_field_counter + 1 %}
124 {% endif %} 124 {% endif %}
125 {# persistentHandleIndex must be the last field, if it is present. 125 {# persistentHandleIndex must be the last field, if it is present.
126 Detailed explanation: https://codereview.chromium.org/139173012 126 Detailed explanation: https://codereview.chromium.org/139173012
127 FIXME: Remove this internal field, and share one field for either: 127 FIXME: Remove this internal field, and share one field for either:
128 * a persistent handle (if the object is in oilpan) or 128 * a persistent handle (if the object is in oilpan) or
129 * a C++ pointer to the DOM object (if the object is not in oilpan) #} 129 * a C++ pointer to the DOM object (if the object is not in oilpan) #}
130 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + {{c ustom_internal_field_counter}}; 130 static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + {{ custom_internal_field_counter}};
131 {# End custom internal fields #} 131 {# End custom internal fields #}
132 {% if unscopables or has_conditional_attributes_on_prototype or 132 {% if unscopables or has_conditional_attributes_on_prototype or
133 methods | conditionally_exposed(is_partial) %} 133 methods | conditionally_exposed(is_partial) %}
134 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8 ::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate); 134 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8 ::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate);
135 {% elif has_partial_interface %} 135 {% elif has_partial_interface %}
136 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8 ::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {} 136 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Conte xt>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8 ::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {}
137 {% endif %} 137 {% endif %}
138 {% if has_partial_interface %} 138 {% if has_partial_interface %}
139 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepare PrototypeAndInterfaceObjectFunction); 139 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepare PrototypeAndInterfaceObjectFunction);
140 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); 140 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWra pperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 template <> 271 template <>
272 struct V8TypeOf<{{cpp_class}}> { 272 struct V8TypeOf<{{cpp_class}}> {
273 typedef {{v8_class}} Type; 273 typedef {{v8_class}} Type;
274 }; 274 };
275 275
276 } // namespace blink 276 } // namespace blink
277 277
278 #endif // {{v8_class}}_h 278 #endif // {{v8_class}}_h
279 279
280 {% endfilter %}{# format_blink_cpp_source_code #} 280 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698