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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/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 indexed_property_getter %} 5 {% block indexed_property_getter %}
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %}
7 {% set getter = indexed_property_getter %} 7 {% set getter = indexed_property_getter %}
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
9 { 9 {
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 #error TODO(yukishiino): Rename this function to prepareInstanceObject (c.f. pre parePrototypeAndInterfaceObject) and implement this function if necessary. http ://crbug.com/503508 863 #error TODO(yukishiino): Rename this function to prepareInstanceObject (c.f. pre parePrototypeAndInterfaceObject) and implement this function if necessary. http ://crbug.com/503508
864 } 864 }
865 865
866 {% endif %} 866 {% endif %}
867 {% endblock %} 867 {% endblock %}
868 868
869 869
870 {##############################################################################} 870 {##############################################################################}
871 {% block prepare_prototype_and_interface_object %} 871 {% block prepare_prototype_and_interface_object %}
872 {% from 'methods.cpp' import install_conditionally_enabled_methods with context %} 872 {% from 'methods.cpp' import install_conditionally_enabled_methods with context %}
873 {% if unscopeables or has_conditional_attributes_on_prototype or conditionally_e nabled_methods %} 873 {% if unscopeables or has_conditional_attributes_on_prototype or methods | condi tionally_exposed(is_partial) %}
874 void {{v8_class}}::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> con text, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::L ocal<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTem plate) 874 void {{v8_class}}::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> con text, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::L ocal<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTem plate)
875 { 875 {
876 v8::Isolate* isolate = context->GetIsolate(); 876 v8::Isolate* isolate = context->GetIsolate();
877 {% if unscopeables %} 877 {% if unscopeables %}
878 {{install_unscopeables() | indent}} 878 {{install_unscopeables() | indent}}
879 {% endif %} 879 {% endif %}
880 {% if has_conditional_attributes_on_prototype %} 880 {% if has_conditional_attributes_on_prototype %}
881 {{install_conditionally_enabled_attributes_on_prototype() | indent}} 881 {{install_conditionally_enabled_attributes_on_prototype() | indent}}
882 {% endif %} 882 {% endif %}
883 {% if conditionally_enabled_methods %} 883 {% if methods | conditionally_exposed(is_partial) %}
884 {{install_conditionally_enabled_methods() | indent}} 884 {{install_conditionally_enabled_methods() | indent}}
885 {% endif %} 885 {% endif %}
886 } 886 }
887 887
888 {% endif %} 888 {% endif %}
889 {% endblock %} 889 {% endblock %}
890 890
891 891
892 {##############################################################################} 892 {##############################################################################}
893 {% macro install_unscopeables() %} 893 {% macro install_unscopeables() %}
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 946
947 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 947 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
948 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 948 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
949 { 949 {
950 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 950 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
951 } 951 }
952 952
953 {% endfor %} 953 {% endfor %}
954 {% endif %} 954 {% endif %}
955 {% endblock %} 955 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698