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

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: 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
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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 {% block install_conditional_attributes %} 802 {% block install_conditional_attributes %}
803 {% from 'attributes.cpp' import attribute_configuration with context %} 803 {% from 'attributes.cpp' import attribute_configuration with context %}
804 {% if has_conditional_attributes %} 804 {% if has_conditional_attributes %}
805 void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> i nstanceObject, v8::Isolate* isolate) 805 void {{v8_class}}::installConditionallyEnabledProperties(v8::Local<v8::Object> i nstanceObject, v8::Isolate* isolate)
806 { 806 {
807 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype()); 807 v8::Local<v8::Object> prototypeObject = v8::Local<v8::Object>::Cast(instance Object->GetPrototype());
808 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext()); 808 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
809 809
810 {% for attribute in attributes if attribute.exposed_test %} 810 {% for attribute in attributes if attribute.exposed_test %}
811 {% filter exposed(attribute.exposed_test) %} 811 {% filter exposed(attribute.exposed_test) %}
812 {% if attribute.is_expose_js_accessors %} 812 #error No one is actually using per-member [Exposed] extended attribute. Remove d the implementation.
haraken 2015/06/17 16:31:21 Removed => Remove
bashi 2015/06/18 02:16:27 Maybe this error says that the implementation has
Yuki 2015/06/18 07:44:41 Yes, I meant so. I updated the error message so i
813 static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {{attribute_configuration(attribute)}}; 813 // TODO(yukishiino): Implement the feature again if there is a client.
814 V8DOMConfiguration::installAccessor(isolate, prototypeObject, accessorConfig uration); 814 {% endfilter %}
815 {% else %} 815 {% endfor %}
816 static const V8DOMConfiguration::AttributeConfiguration attributeConfigurati on = {{attribute_configuration(attribute)}}; 816 {% for method in methods if method.exposed_test %}
817 V8DOMConfiguration::installAttribute(isolate, instanceObject, prototypeObjec t, attributeConfiguration); 817 {% filter exposed(method.exposed_test) %}
818 {% endif %} 818 #error No one is actually using per-member [Exposed] extended attribute. Remove d the implementation.
haraken 2015/06/17 16:31:21 Ditto.
819 // TODO(yukishiino): Implement the feature again if there is a client.
819 {% endfilter %} 820 {% endfilter %}
820 {% endfor %} 821 {% endfor %}
821 } 822 }
822 823
823 {% endif %} 824 {% endif %}
824 {% endblock %} 825 {% endblock %}
825 826
826 827
827 {##############################################################################} 828 {##############################################################################}
828 {% block prepare_prototype_object %} 829 {% block prepare_prototype_object %}
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 } 944 }
944 945
945 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 946 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
946 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 947 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
947 { 948 {
948 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 949 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
949 } 950 }
950 {% endfor %} 951 {% endfor %}
951 {% endif %} 952 {% endif %}
952 {% endblock %} 953 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698