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

Side by Side Diff: sky/engine/bindings/scripts/templates/methods_cpp.template

Issue 943013002: Implement Custom Elements (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: attributeChanged***d***Callback Created 5 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 {##############################################################################} 1 {##############################################################################}
2 {# FIXME: We should return a rejected Promise if an error occurs in this 2 {# FIXME: We should return a rejected Promise if an error occurs in this
3 function when ALL methods in this overload return Promise. In order to do so, 3 function when ALL methods in this overload return Promise. In order to do so,
4 we must ensure either ALL or NO methods in this overload return Promise #} 4 we must ensure either ALL or NO methods in this overload return Promise #}
5 {% macro overload_resolution_method(method) %} 5 {% macro overload_resolution_method(method) %}
6 {% set overloads = method.overloads %} 6 {% set overloads = method.overloads %}
7 {% if method.is_static %} 7 {% if method.is_static %}
8 {% set offset = 0 %} 8 {% set offset = 0 %}
9 {% else %} 9 {% else %}
10 {% set offset = 1 %} 10 {% set offset = 1 %}
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 {# delegation to the create is emitted. 74 {# delegation to the create is emitted.
75 {##############################################################################} 75 {##############################################################################}
76 {% macro generate_method(method, arguments_count) %} 76 {% macro generate_method(method, arguments_count) %}
77 {% set overload_index = method.overload_index %} 77 {% set overload_index = method.overload_index %}
78 static void {{static_method_name(method.name, overload_index)}}(Dart_NativeArgum ents args) 78 static void {{static_method_name(method.name, overload_index)}}(Dart_NativeArgum ents args)
79 { 79 {
80 {% if not method.is_static %} 80 {% if not method.is_static %}
81 {{cpp_class}}* /* FIXME(vsm): Remove this. */ ALLOW_UNUSED receiver = GetRec eiver<{{cpp_class}}>(args); 81 {{cpp_class}}* /* FIXME(vsm): Remove this. */ ALLOW_UNUSED receiver = GetRec eiver<{{cpp_class}}>(args);
82 {% endif %} 82 {% endif %}
83 {% if method.is_custom_element_callbacks %} 83 {% if method.is_custom_element_callbacks %}
84 CustomElementProcessingStack::CallbackDeliveryScope deliveryScope; 84 NewCustomElementCallbackScope deliveryScope;
85 {% endif %} 85 {% endif %}
86 {% if arguments_count > 0 or 86 {% if arguments_count > 0 or
87 method.has_exception_state or 87 method.has_exception_state or
88 method.is_call_with_script_state or 88 method.is_call_with_script_state or
89 method.is_call_with_execution_context or 89 method.is_call_with_execution_context or
90 method.is_call_with_script_arguments %} 90 method.is_call_with_script_arguments %}
91 Dart_Handle exception = nullptr; 91 Dart_Handle exception = nullptr;
92 {% endif %} 92 {% endif %}
93 { 93 {
94 {% if method.is_call_with_script_state %} 94 {% if method.is_call_with_script_state %}
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 {##############################################################################} 400 {##############################################################################}
401 {% macro generate_symbolizer_constructor(dart_class, class_name, constructor) %} 401 {% macro generate_symbolizer_constructor(dart_class, class_name, constructor) %}
402 {% for native_entry in constructor.native_entries %} 402 {% for native_entry in constructor.native_entries %}
403 {% set resolver_string = native_entry.resolver_string %} 403 {% set resolver_string = native_entry.resolver_string %}
404 if (native_function == {{dart_class}}Internal::{{static_method_name(constructor. name, constructor.overload_index)}}) { 404 if (native_function == {{dart_class}}Internal::{{static_method_name(constructor. name, constructor.overload_index)}}) {
405 return reinterpret_cast<const uint8_t*>("{{resolver_string}}"); 405 return reinterpret_cast<const uint8_t*>("{{resolver_string}}");
406 } 406 }
407 {% endfor %} 407 {% endfor %}
408 {% endmacro %} 408 {% endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698