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

Side by Side Diff: Source/bindings/templates/interface.cpp

Issue 1181113006: bindings: Introduces on_{instance,prototype,interface} in the code generator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed review comments. Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% extends 'interface_base.cpp' %} 1 {% extends 'interface_base.cpp' %}
2 2
3 3
4 {##############################################################################} 4 {##############################################################################}
5 {% block indexed_property_getter %} 5 {% block indexed_property_getter %}
6 {% if indexed_property_getter and not indexed_property_getter.is_custom %} 6 {% if indexed_property_getter and not indexed_property_getter.is_custom %}
7 {% set getter = indexed_property_getter %} 7 {% set getter = indexed_property_getter %}
8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 8 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
9 { 9 {
10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder()); 10 {{cpp_class}}* impl = {{v8_class}}::toImpl(info.Holder());
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 {% block install_conditional_attributes %} 798 {% block install_conditional_attributes %}
799 {% from 'attributes.cpp' import attribute_configuration with context %} 799 {% from 'attributes.cpp' import attribute_configuration with context %}
800 {% if has_conditional_attributes %} 800 {% if has_conditional_attributes %}
801 void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> i nstanceObject, v8::Isolate* isolate) 801 void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> i nstanceObject, v8::Isolate* isolate)
802 { 802 {
803 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 803 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
804 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 804 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
805 805
806 {% for attribute in attributes if attribute.exposed_test %} 806 {% for attribute in attributes if attribute.exposed_test %}
807 {% filter exposed(attribute.exposed_test) %} 807 {% filter exposed(attribute.exposed_test) %}
808 {% if attribute.is_expose_js_accessors %} 808 #error No one is actually using per-member [Exposed] extended attribute. Not su pported. Contact to blink-reviews-bindings@ if you need.
809 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}}; 809 // TODO(yukishiino): Implement the feature again if there is a client.
810 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorConfig uration); 810 {% endfilter %}
811 {% else %} 811 {% endfor %}
812 static const V8DOMConfiguration::AttributeConfiguration attributeConfigurati on = {{attribute_configuration(attribute)}}; 812 {% for method in methods if method.exposed_test %}
813 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeObjec t, attributeConfiguration); 813 {% filter exposed(method.exposed_test) %}
814 {% endif %} 814 #error No one is actually using per-member [Exposed] extended attribute. Not su pported. Contact to blink-reviews-bindings@ if you need.
815 // TODO(yukishiino): Implement the feature again if there is a client.
815 {% endfilter %} 816 {% endfilter %}
816 {% endfor %} 817 {% endfor %}
817 } 818 }
818 819
819 {% endif %} 820 {% endif %}
820 {% endblock %} 821 {% endblock %}
821 822
822 823
823 {##############################################################################} 824 {##############################################################################}
824 {% block prepare_prototype_object %} 825 {% block prepare_prototype_object %}
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 } 940 }
940 941
941 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 942 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
942 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 943 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
943 { 944 {
944 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 945 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
945 } 946 }
946 {% endfor %} 947 {% endfor %}
947 {% endif %} 948 {% endif %}
948 {% endblock %} 949 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/attributes.cpp ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698