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

Unified Diff: third_party/WebKit/Source/bindings/templates/interface.cpp

Issue 1386843002: bindings: Implements the named properties object (WindowProperties). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/interface.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp b/third_party/WebKit/Source/bindings/templates/interface.cpp
index cd9099936adf991f54f65ef57b394c08b6aad057..e5fe9d5c3ec15dfa78466d103df1fee850b68c75 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp
@@ -665,6 +665,24 @@ v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplate(v8::Isolate* isolate)
{##############################################################################}
+{% block get_dom_template_for_named_properties_object %}
+{% if has_named_properties_object %}
+v8::Local<v8::FunctionTemplate> {{v8_class}}::domTemplateForNamedPropertiesObject(v8::Isolate* isolate)
+{
+ v8::Local<v8::FunctionTemplate> parentTemplate = V8{{parent_interface}}::domTemplate(isolate);
+ v8::Local<v8::FunctionTemplate> namedPropertiesObjectFunctionTemplate = v8::FunctionTemplate::New(isolate);
+ namedPropertiesObjectFunctionTemplate->SetClassName(v8AtomicString(isolate, "{{interface_name}}Properties"));
+ namedPropertiesObjectFunctionTemplate->Inherit(parentTemplate);
+ v8::Local<v8::ObjectTemplate> namedPropertiesObjectTemplate = namedPropertiesObjectFunctionTemplate->PrototypeTemplate();
+
+ return namedPropertiesObjectFunctionTemplate;
+}
+
+{% endif %}
+{% endblock %}
+
+
+{##############################################################################}
{% block has_instance %}
bool {{v8_class}}::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
{
@@ -902,6 +920,7 @@ void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt
{
{{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
}
+
{% endfor %}
{% endif %}
{% endblock %}

Powered by Google App Engine
This is Rietveld 408576698