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

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

Issue 80153003: IDL compiler: [CustomLegacyCall] interfaces, cleanup header conditional spacing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 1 month 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 {% macro attribute_configuration(attribute) %} 5 {% macro attribute_configuration(attribute) %}
6 {% set getter_callback_name = 6 {% set getter_callback_name =
7 '%sV8Internal::%sAttributeGetterCallback' % 7 '%sV8Internal::%sAttributeGetterCallback' %
8 (interface_name, attribute.name) 8 (interface_name, attribute.name)
9 if not attribute.constructor_type else 9 if not attribute.constructor_type else
10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %} 10 '{0}V8Internal::{0}ConstructorGetter'.format(interface_name) %}
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 {% endif %}{# install_custom_signature #} 223 {% endif %}{# install_custom_signature #}
224 {% endfor %} 224 {% endfor %}
225 {% for attribute in attributes if attribute.is_static %} 225 {% for attribute in attributes if attribute.is_static %}
226 {% set getter_callback_name = '%sV8Internal::%sAttributeGetterCallback' % 226 {% set getter_callback_name = '%sV8Internal::%sAttributeGetterCallback' %
227 (interface_name, attribute.name) %} 227 (interface_name, attribute.name) %}
228 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("{{attribute.n ame}}"), {{getter_callback_name}}, {{attribute.setter_callback_name}}, v8::Exter nal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v 8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 228 functionTemplate->SetNativeDataProperty(v8::String::NewSymbol("{{attribute.n ame}}"), {{getter_callback_name}}, {{attribute.setter_callback_name}}, v8::Exter nal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v 8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
229 {% endfor %} 229 {% endfor %}
230 {% if constants %} 230 {% if constants %}
231 {{install_constants() | indent}} 231 {{install_constants() | indent}}
232 {% endif %} 232 {% endif %}
233 {% if has_custom_legacy_call %}
234 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler({{v8_class_na me}}::legacyCallCustom);
235 {% endif %}
233 236
234 // Custom toString template 237 // Custom toString template
235 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c urrent()->toStringTemplate()); 238 functionTemplate->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::c urrent()->toStringTemplate());
236 return functionTemplate; 239 return functionTemplate;
237 } 240 }
238 241
239 {% endblock %} 242 {% endblock %}
240 243
241 244
242 {######################################} 245 {######################################}
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 V8DOMWrapper::associateObjectWithWrapper<{{v8_class_name}}>(impl, &wrapperTy peInfo, wrapper, isolate, {{wrapper_configuration}}); 395 V8DOMWrapper::associateObjectWithWrapper<{{v8_class_name}}>(impl, &wrapperTy peInfo, wrapper, isolate, {{wrapper_configuration}});
393 return wrapper; 396 return wrapper;
394 } 397 }
395 398
396 void {{v8_class_name}}::derefObject(void* object) 399 void {{v8_class_name}}::derefObject(void* object)
397 { 400 {
398 fromInternalPointer(object)->deref(); 401 fromInternalPointer(object)->deref();
399 } 402 }
400 403
401 {% endblock %} 404 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.h ('k') | Source/bindings/tests/idls/TestCustomLegacyCallInterface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698