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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/methods.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 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% macro generate_method(method, world_suffix) %} 4 {% macro generate_method(method, world_suffix) %}
5 {% if method.returns_promise and method.has_exception_state %} 5 {% if method.returns_promise and method.has_exception_state %}
6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e) 6 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e)
7 {% else %} 7 {% else %}
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
9 {% endif %} 9 {% endif %}
10 { 10 {
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 665
666 {######################################} 666 {######################################}
667 {% macro install_custom_signature(method, instance_template, prototype_template, interface_template, signature) %} 667 {% macro install_custom_signature(method, instance_template, prototype_template, interface_template, signature) %}
668 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}}; 668 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
669 V8DOMConfiguration::installMethod(isolate, world, {{instance_template}}, {{proto type_template}}, {{interface_template}}, {{signature}}, {{method.name}}MethodCon figuration); 669 V8DOMConfiguration::installMethod(isolate, world, {{instance_template}}, {{proto type_template}}, {{interface_template}}, {{signature}}, {{method.name}}MethodCon figuration);
670 {%- endmacro %} 670 {%- endmacro %}
671 671
672 {######################################} 672 {######################################}
673 {% macro install_conditionally_enabled_methods() %} 673 {% macro install_conditionally_enabled_methods() %}
674 {% if conditionally_enabled_methods %} 674 {% if methods | conditionally_exposed(is_partial) %}
675 {# Define operations with limited exposure #} 675 {# Define operations with limited exposure #}
676 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla te); 676 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTempla te);
677 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creatio nContext()); 677 ExecutionContext* executionContext = toExecutionContext(prototypeObject->Creatio nContext());
678 ASSERT(executionContext); 678 ASSERT(executionContext);
679 {% for method in conditionally_enabled_methods %} 679 {% for method in methods | conditionally_exposed(is_partial) %}
680 {% filter exposed(method.overloads.exposed_test_all 680 {% filter exposed(method.overloads.exposed_test_all
681 if method.overloads else 681 if method.overloads else
682 method.exposed_test) %} 682 method.exposed_test) %}
683 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 683 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
684 if method.overloads else 684 if method.overloads else
685 method.runtime_enabled_function) %} 685 method.runtime_enabled_function) %}
686 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}}; 686 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
687 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration); 687 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), proto typeObject, interfaceObject, signature, {{method.name}}MethodConfiguration);
688 {% endfilter %}{# runtime_enabled() #} 688 {% endfilter %}{# runtime_enabled() #}
689 {% endfilter %}{# exposed() #} 689 {% endfilter %}{# exposed() #}
690 {% endfor %} 690 {% endfor %}
691 {% endif %} 691 {% endif %}
692 {%- endmacro %} 692 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698