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

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

Issue 1550393002: Rename conversions.cpp to utilities.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 'conversions.cpp' import declare_enum_validation_variable, v8_value_to_l ocal_cpp_value %} 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc al_cpp_value %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% macro generate_method(method, world_suffix) %} 5 {% macro generate_method(method, world_suffix) %}
6 {% filter conditional(method.conditional_string) %} 6 {% filter conditional(method.conditional_string) %}
7 {% if method.returns_promise and method.has_exception_state %} 7 {% if method.returns_promise and method.has_exception_state %}
8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e) 8 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}Promis e(const v8::FunctionCallbackInfo<v8::Value>& info, ExceptionState& exceptionStat e)
9 {% else %} 9 {% else %}
10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) 10 static void {{method.name}}{{method.overload_index}}Method{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info)
11 {% endif %} 11 {% endif %}
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 if constructor.is_named_constructor else 666 if constructor.is_named_constructor else
667 '') %} 667 '') %}
668 v8::Local<v8::Object> wrapper = info.Holder(); 668 v8::Local<v8::Object> wrapper = info.Holder();
669 wrapper = impl->associateWithWrapper(info.GetIsolate(), &{{constructor_class}}:: wrapperTypeInfo, wrapper); 669 wrapper = impl->associateWithWrapper(info.GetIsolate(), &{{constructor_class}}:: wrapperTypeInfo, wrapper);
670 v8SetReturnValue(info, wrapper); 670 v8SetReturnValue(info, wrapper);
671 {% endmacro %} 671 {% endmacro %}
672 672
673 673
674 {##############################################################################} 674 {##############################################################################}
675 {% macro method_configuration(method) %} 675 {% macro method_configuration(method) %}
676 {% from 'conversions.cpp' import property_location %} 676 {% from 'utilities.cpp' import property_location %}
677 {% set method_callback = 677 {% set method_callback =
678 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %} 678 '%sV8Internal::%sMethodCallback' % (cpp_class_or_partial, method.name) %}
679 {% set method_callback_for_main_world = 679 {% set method_callback_for_main_world =
680 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, met hod.name) 680 '%sV8Internal::%sMethodCallbackForMainWorld' % (cpp_class_or_partial, met hod.name)
681 if method.is_per_world_bindings else '0' %} 681 if method.is_per_world_bindings else '0' %}
682 {% set property_attribute = 682 {% set property_attribute =
683 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_att ributes) 683 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_att ributes)
684 if method.property_attributes else 'v8::None' %} 684 if method.property_attributes else 'v8::None' %}
685 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo sedToAllScripts' %} 685 {% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivat eScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::Expo sedToAllScripts' %}
686 {"{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{m ethod.length}}, {{property_attribute}}, {{only_exposed_to_private_script}}, {{pr operty_location(method)}}} 686 {"{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{m ethod.length}}, {{property_attribute}}, {{only_exposed_to_private_script}}, {{pr operty_location(method)}}}
(...skipping 20 matching lines...) Expand all
707 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all 707 {% filter runtime_enabled(method.overloads.runtime_enabled_function_all
708 if method.overloads else 708 if method.overloads else
709 method.runtime_enabled_function) %} 709 method.runtime_enabled_function) %}
710 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}}; 710 const V8DOMConfiguration::MethodConfiguration {{method.name}}MethodConfiguration = {{method_configuration(method)}};
711 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration); 711 V8DOMConfiguration::installMethod(isolate, v8::Local<v8::Object>(), prototypeObj ect, interfaceObject, defaultSignature, {{method.name}}MethodConfiguration);
712 {% endfilter %}{# runtime_enabled() #} 712 {% endfilter %}{# runtime_enabled() #}
713 {% endfilter %}{# exposed() #} 713 {% endfilter %}{# exposed() #}
714 {% endfor %} 714 {% endfor %}
715 {% endif %} 715 {% endif %}
716 {%- endmacro %} 716 {%- endmacro %}
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface.cpp ('k') | third_party/WebKit/Source/bindings/templates/templates.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698