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

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

Issue 2653883006: [bindings] Move callback functions from V8FooInternal namespace to V8Foo class (Closed)
Patch Set: 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_or_partial}}_h 4 #ifndef {{v8_class_or_partial}}_h
5 #define {{v8_class_or_partial}}_h 5 #define {{v8_class_or_partial}}_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 {% if needs_runtime_enabled_installer %} 45 {% if needs_runtime_enabled_installer %}
46 static void installRuntimeEnabledFeatures( 46 static void installRuntimeEnabledFeatures(
47 v8::Isolate* isolate, 47 v8::Isolate* isolate,
48 const DOMWrapperWorld& world, 48 const DOMWrapperWorld& world,
49 v8::Local<v8::Object> instance, 49 v8::Local<v8::Object> instance,
50 v8::Local<v8::Object> prototype, 50 v8::Local<v8::Object> prototype,
51 v8::Local<v8::Function> interface); 51 v8::Local<v8::Function> interface);
52 {% endif %} 52 {% endif %}
53 53
54 // Callback functions
55 {% for attribute in attributes %}
56 {% if attribute.is_cached_accessor %}
57 {{exported}}static v8::Local<v8::Private> {{attribute.name}}CachedAccessorCall back(v8::Isolate* isolate);
58 {% endif %}
59 {% for world_suffix in attribute.world_suffixes %}
60 {% if not attribute.constructor_type %}
61 {{exported}}static void {{attribute.name}}AttributeGetterCallback{{world_suffi x}}(
62 {%- if attribute.is_data_type_property %}
63 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info
64 {%- else %}
65 const v8::FunctionCallbackInfo<v8::Value>& info
66 {%- endif %});
67 {% elif attribute.needs_constructor_getter_callback %}
68 {{exported}}static void {{attribute.name}}ConstructorGetterCallback{{world_suf fix}}(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& i nfo);
69 {% endif %}
70 {% if attribute.has_setter %}
71 {{exported}}static void {{attribute.name}}AttributeSetterCallback{{world_suffi x}}(
72 {%- if attribute.is_data_type_property %}
73 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbac kInfo<void>& info
74 {%- else %}
75 const v8::FunctionCallbackInfo<v8::Value>& info
76 {%- endif %});
77 {% endif %}
78 {% endfor %}
79 {% endfor %}
80
81 {% for method in methods %}
82 {% for world_suffix in method.world_suffixes %}
83 {% if not method.overload_index or method.overloads %}
84 {# Document about the following condition: #}
85 {# https://docs.google.com/document/d/1qBC7Therp437Jbt_QYAtNYMZs6zQ_7_tnMkNUG_ ACqs/edit?usp=sharing #}
86 {% if (method.overloads and method.overloads.visible and
87 (not method.overloads.has_partial_overloads or not is_partial)) or
88 (not method.overloads and method.visible) %}
89 {# A single callback is generated for overloaded methods #}
90 {# with considering partial overloads #}
91 {{exported}}static void {{method.name}}MethodCallback{{world_suffix}}(const v8 ::FunctionCallbackInfo<v8::Value>& info);
92 {% endif %}
93 {% endif %}
94 {% if method.is_cross_origin and method.visible %}
95 {{exported}}static void {{method.name}}OriginSafeMethodGetterCallback{{world_s uffix}}(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info);
96 {% endif %}
97 {% endfor %}
98 {% endfor %}
99 {% if iterator_method %}
100 {{exported}}static void {{iterator_method.name}}MethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info);
101 {% endif %}
102 {% if has_origin_safe_method_setter %}
103 {{exported}}static void {{cpp_class}}OriginSafeMethodSetterCallback(v8::Local< v8::Name> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<voi d>& info);
104 {% endif %}
105
54 private: 106 private:
55 static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); 107 static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
56 }; 108 };
57 109
58 } // namespace blink 110 } // namespace blink
59 111
60 #endif // {{v8_class_or_partial}}_h 112 #endif // {{v8_class_or_partial}}_h
61 113
62 {% endfilter %}{# format_blink_cpp_source_code #} 114 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698