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

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

Issue 1685393002: [Experimental Framework] Rename IDL attribute to OriginTrialEnabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alphabetize context dict entries Created 4 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 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value, check_api_experiment %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value, check_origin_trial %}
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 {
11 {# Local variables #} 11 {# Local variables #}
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 {% macro method_callback(method, world_suffix) %} 499 {% macro method_callback(method, world_suffix) %}
500 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall backInfo<v8::Value>& info) 500 static void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCall backInfo<v8::Value>& info)
501 { 501 {
502 {% if not method.overloads %}{# Overloaded methods are measured in overload_ resolution_method() #} 502 {% if not method.overloads %}{# Overloaded methods are measured in overload_ resolution_method() #}
503 {% if method.measure_as %} 503 {% if method.measure_as %}
504 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); 504 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte xt(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}});
505 {% endif %} 505 {% endif %}
506 {% if method.deprecate_as %} 506 {% if method.deprecate_as %}
507 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe cutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); 507 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe cutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}});
508 {% endif %} 508 {% endif %}
509 {% if method.is_api_experiment_enabled %} 509 {% if method.is_origin_trial_enabled %}
510 {{check_api_experiment(method) | indent}} 510 {{check_origin_trial(method) | indent}}
511 {% endif %} 511 {% endif %}
512 {% endif %}{# not method.overloads #} 512 {% endif %}{# not method.overloads #}
513 {% if world_suffix in method.activity_logging_world_list %} 513 {% if world_suffix in method.activity_logging_world_list %}
514 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo ntext()); 514 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo ntext());
515 V8PerContextData* contextData = scriptState->perContextData(); 515 V8PerContextData* contextData = scriptState->perContextData();
516 {% if method.activity_logging_world_check %} 516 {% if method.activity_logging_world_check %}
517 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac tivityLogger()) 517 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac tivityLogger())
518 {% else %} 518 {% else %}
519 if (contextData && contextData->activityLogger()) { 519 if (contextData && contextData->activityLogger()) {
520 {% endif %} 520 {% endif %}
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 701 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
702 if method.overloads else 702 if method.overloads else
703 method.runtime_enabled_function) %} 703 method.runtime_enabled_function) %}
704 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}}; 704 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
705 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); 705 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration);
706 {% endfilter %}{# runtime_enabled() #} 706 {% endfilter %}{# runtime_enabled() #}
707 {% endfilter %}{# exposed() #} 707 {% endfilter %}{# exposed() #}
708 {% endfor %} 708 {% endfor %}
709 {% endif %} 709 {% endif %}
710 {%- endmacro %} 710 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698