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

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

Issue 2106983002: Allow origin trials to be declared on IDL operations (methods) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unneeded includes, addressing nits Created 4 years, 5 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 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% block prepare_prototype_and_interface_object %} 5 {% block prepare_prototype_and_interface_object %}
6 {% from 'interface.cpp' import install_unscopeables with context %} 6 {% from 'interface.cpp' import install_unscopeables with context %}
7 {% from 'interface.cpp' import install_conditionally_enabled_attributes_on_proto type with context %} 7 {% from 'interface.cpp' import install_conditionally_enabled_attributes_on_proto type with context %}
8 {% from 'methods.cpp' import install_conditionally_enabled_methods 8 {% from 'methods.cpp' import install_conditionally_enabled_methods
9 with context %} 9 with context %}
10 void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C ontext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeOb ject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> i nterfaceTemplate) 10 void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C ontext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeOb ject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> i nterfaceTemplate)
11 { 11 {
12 {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeOb ject, interfaceObject, interfaceTemplate); 12 {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeOb ject, interfaceObject, interfaceTemplate);
13 {% if unscopeables or 13 {% if unscopeables or
14 has_conditional_attributes_on_prototype or 14 has_conditional_attributes_on_prototype or
15 conditionally_enabled_methods %} 15 methods | conditionally_exposed(is_partial) %}
16 v8::Isolate* isolate = context->GetIsolate(); 16 v8::Isolate* isolate = context->GetIsolate();
17 {% endif %} 17 {% endif %}
18 {% if unscopeables %} 18 {% if unscopeables %}
19 {{install_unscopeables() | indent}} 19 {{install_unscopeables() | indent}}
20 {% endif %} 20 {% endif %}
21 {% if has_conditional_attributes_on_prototype %} 21 {% if has_conditional_attributes_on_prototype %}
22 {{install_conditionally_enabled_attributes_on_prototype() | indent}} 22 {{install_conditionally_enabled_attributes_on_prototype() | indent}}
23 {% endif %} 23 {% endif %}
24 {% if conditionally_enabled_methods %} 24 {% if methods | conditionally_exposed(is_partial) %}
25 {{install_conditionally_enabled_methods() | indent}} 25 {{install_conditionally_enabled_methods() | indent}}
26 {% endif %} 26 {% endif %}
27 } 27 }
28 28
29 {% endblock %} 29 {% endblock %}
30 30
31 31
32 {##############################################################################} 32 {##############################################################################}
33 {% block partial_interface %} 33 {% block partial_interface %}
34 void {{v8_class_or_partial}}::initialize() 34 void {{v8_class_or_partial}}::initialize()
35 { 35 {
36 // Should be invoked from ModulesInitializer. 36 // Should be invoked from ModulesInitializer.
37 {{v8_class}}::updateWrapperTypeInfo( 37 {{v8_class}}::updateWrapperTypeInfo(
38 &{{v8_class_or_partial}}::install{{v8_class}}Template, 38 &{{v8_class_or_partial}}::install{{v8_class}}Template,
39 &{{v8_class_or_partial}}::preparePrototypeAndInterfaceObject); 39 &{{v8_class_or_partial}}::preparePrototypeAndInterfaceObject);
40 {% for method in methods %} 40 {% for method in methods %}
41 {% if method.overloads and method.overloads.has_partial_overloads %} 41 {% if method.overloads and method.overloads.has_partial_overloads %}
42 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInte rface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method); 42 {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInte rface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method);
43 {% endif %} 43 {% endif %}
44 {% endfor %} 44 {% endfor %}
45 } 45 }
46 46
47 {% endblock %} 47 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698