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

Unified Diff: third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl

Issue 2454133002: [Bindings] Reformat template files for Interface (1/4) (Closed)
Patch Set: Rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
index 4fabaa87bad2396ace168df348f0f761ab282e1d..d337c72da2cee20053f6d97281bdfaaa2582c2cc 100644
--- a/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
@@ -13,22 +13,20 @@
{% block prepare_prototype_and_interface_object %}
{% from 'interface.cpp.tmpl' import install_unscopables with context %}
{% from 'interface.cpp.tmpl' import install_conditionally_enabled_attributes_on_prototype with context %}
-{% from 'methods.cpp.tmpl' import install_conditionally_enabled_methods
- with context %}
+{% from 'methods.cpp.tmpl' import install_conditionally_enabled_methods with context %}
{% if has_prepare_prototype_and_interface_object %}
-void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate)
-{
+void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
#error No one is currently using a partial interface with context-dependent properties. If you\'re planning to use it, please consult with the binding team: <blink-reviews-bindings@chromium.org>
- {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObject, interfaceObject, interfaceTemplate);
- v8::Isolate* isolate = context->GetIsolate();
+ {{v8_class}}::preparePrototypeAndInterfaceObject(context, world, prototypeObject, interfaceObject, interfaceTemplate);
+ v8::Isolate* isolate = context->GetIsolate();
{% if unscopables %}
- {{install_unscopables() | indent}}
+ {{install_unscopables() | indent(2)}}
{% endif %}
{% if has_conditional_attributes_on_prototype %}
- {{install_conditionally_enabled_attributes_on_prototype() | indent}}
+ {{install_conditionally_enabled_attributes_on_prototype() | indent(2)}}
{% endif %}
{% if methods | conditionally_exposed(is_partial) %}
- {{install_conditionally_enabled_methods() | indent}}
+ {{install_conditionally_enabled_methods() | indent(2)}}
{% endif %}
}
{% endif %}
@@ -38,17 +36,16 @@ void {{v8_class_or_partial}}::preparePrototypeAndInterfaceObject(v8::Local<v8::C
{##############################################################################}
{% block partial_interface %}
-void {{v8_class_or_partial}}::initialize()
-{
- // Should be invoked from ModulesInitializer.
- {{v8_class}}::updateWrapperTypeInfo(
- &{{v8_class_or_partial}}::install{{v8_class}}Template,
- {{prepare_prototype_and_interface_object_func}});
- {% for method in methods %}
- {% if method.overloads and method.overloads.has_partial_overloads %}
- {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method);
- {% endif %}
- {% endfor %}
+void {{v8_class_or_partial}}::initialize() {
+ // Should be invoked from ModulesInitializer.
+ {{v8_class}}::updateWrapperTypeInfo(
+ &{{v8_class_or_partial}}::install{{v8_class}}Template,
+ {{prepare_prototype_and_interface_object_func}});
+ {% for method in methods %}
+ {% if method.overloads and method.overloads.has_partial_overloads %}
+ {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInterface(&{{cpp_class_or_partial}}V8Internal::{{method.name}}Method);
+ {% endif %}
+ {% endfor %}
}
{% endblock %}

Powered by Google App Engine
This is Rietveld 408576698