OLD | NEW |
1 {% include 'copyright_block.txt' %} | 1 {% include 'copyright_block.txt' %} |
2 #ifndef {{v8_class}}_h | 2 #ifndef {{v8_class}}_h |
3 #define {{v8_class}}_h | 3 #define {{v8_class}}_h |
4 | 4 |
5 {% for filename in header_includes %} | 5 {% for filename in header_includes %} |
6 #include "{{filename}}" | 6 #include "{{filename}}" |
7 {% endfor %} | 7 {% endfor %} |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 {% if has_event_constructor %} | 11 {% if has_event_constructor %} |
12 class Dictionary; | 12 class Dictionary; |
13 {% endif %} | 13 {% endif %} |
| 14 {% if attributes|origin_trial_enabled_attributes %} |
| 15 class ScriptState; |
| 16 {% endif %} |
14 {% if named_constructor %} | 17 {% if named_constructor %} |
15 class {{v8_class}}Constructor { | 18 class {{v8_class}}Constructor { |
16 STATIC_ONLY({{v8_class}}Constructor); | 19 STATIC_ONLY({{v8_class}}Constructor); |
17 public: | 20 public: |
18 static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWr
apperWorld&); | 21 static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWr
apperWorld&); |
19 static const WrapperTypeInfo wrapperTypeInfo; | 22 static const WrapperTypeInfo wrapperTypeInfo; |
20 }; | 23 }; |
21 | 24 |
22 {% endif %} | 25 {% endif %} |
23 class {{v8_class}} { | 26 class {{v8_class}} { |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Con
text>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<
v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate
){% if unscopeables or has_conditional_attributes_on_prototype or conditionally_
enabled_methods %}; | 161 {{exported}}static void preparePrototypeAndInterfaceObject(v8::Local<v8::Con
text>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<
v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate
){% if unscopeables or has_conditional_attributes_on_prototype or conditionally_
enabled_methods %}; |
159 {% else %} { } | 162 {% else %} { } |
160 {% endif %} | 163 {% endif %} |
161 {% if has_partial_interface %} | 164 {% if has_partial_interface %} |
162 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepa
rePrototypeAndInterfaceObjectFunction); | 165 {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, Prepa
rePrototypeAndInterfaceObjectFunction); |
163 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMW
rapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); | 166 {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMW
rapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate); |
164 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} | 167 {% for method in methods if method.overloads and method.overloads.has_partia
l_overloads %} |
165 {{exported}}static void register{{method.name | blink_capitalize}}MethodForP
artialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); | 168 {{exported}}static void register{{method.name | blink_capitalize}}MethodForP
artialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&)); |
166 {% endfor %} | 169 {% endfor %} |
167 {% endif %} | 170 {% endif %} |
| 171 {% for group in attributes|origin_trial_enabled_attributes|groupby('origin_t
rial_feature_name') %}{{newline}} |
| 172 static void install{{group.grouper}}(ScriptState*, v8::Local<v8::Object> ins
tance); |
| 173 {% endfor %} |
168 {% if has_partial_interface %} | 174 {% if has_partial_interface %} |
169 | 175 |
170 private: | 176 private: |
171 static InstallTemplateFunction install{{v8_class}}TemplateFunction; | 177 static InstallTemplateFunction install{{v8_class}}TemplateFunction; |
172 {% endif %} | 178 {% endif %} |
173 }; | 179 }; |
174 | 180 |
175 {% if has_event_constructor %} | 181 {% if has_event_constructor %} |
176 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&,
ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info); | 182 {{exported}}bool initialize{{cpp_class}}({{cpp_class}}Init&, const Dictionary&,
ExceptionState&, const v8::FunctionCallbackInfo<v8::Value>& info); |
177 | 183 |
178 {% endif %} | 184 {% endif %} |
179 template <> | 185 template <> |
180 struct V8TypeOf<{{cpp_class}}> { | 186 struct V8TypeOf<{{cpp_class}}> { |
181 typedef {{v8_class}} Type; | 187 typedef {{v8_class}} Type; |
182 }; | 188 }; |
183 | 189 |
184 } // namespace blink | 190 } // namespace blink |
185 | 191 |
186 #endif // {{v8_class}}_h | 192 #endif // {{v8_class}}_h |
OLD | NEW |