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

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

Issue 101533007: IDL compiler: [InitializedByEventConstructor] (basic) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 = 6 {% set getter_callback =
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 {% endif %} 248 {% endif %}
249 {% endblock %} 249 {% endblock %}
250 250
251 251
252 {##############################################################################} 252 {##############################################################################}
253 {% block initialize_event %} 253 {% block initialize_event %}
254 {% if has_event_constructor %} 254 {% if has_event_constructor %}
255 bool fill{{cpp_class}}Init({{cpp_class}}Init& eventInit, const Dictionary& optio ns, ExceptionState& exceptionState, const String& forEventName) 255 bool fill{{cpp_class}}Init({{cpp_class}}Init& eventInit, const Dictionary& optio ns, ExceptionState& exceptionState, const String& forEventName)
256 { 256 {
257 Dictionary::ConversionContext conversionContext(forEventName.isEmpty() ? Str ing("{{interface_name}}") : forEventName, "", exceptionState); 257 Dictionary::ConversionContext conversionContext(forEventName.isEmpty() ? Str ing("{{interface_name}}") : forEventName, "", exceptionState);
258 {# FIXME: implement [InitializedByEventConstructor] #} 258 {# FIXME: parent interface #}
259 {% for attribute in attributes
260 if attribute.is_initialized_by_event_constructor %}
261 {# FIXME: implement [ImplementedAs] #}
262 {# FIXME: implement [DeprecateAs] #}
263 {# FIXME: special-case any #}
264 {# FIXME: implement withPropertyAttributes #}
265 if (!options.convert(conversionContext, "{{attribute.name}}", eventInit.{{at tribute.name}}))
266 return false;
267 {% endfor %}
259 return true; 268 return true;
260 } 269 }
261 270
262 {% endif %} 271 {% endif %}
263 {% endblock %} 272 {% endblock %}
264 273
265 274
266 {##############################################################################} 275 {##############################################################################}
267 {% block constructor_callback %} 276 {% block constructor_callback %}
268 {% if has_constructor or has_event_constructor %} 277 {% if has_constructor or has_event_constructor %}
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 fromInternalPointer(object)->deref(); 629 fromInternalPointer(object)->deref();
621 } 630 }
622 631
623 template<> 632 template<>
624 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 633 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
625 { 634 {
626 return toV8(impl, creationContext, isolate); 635 return toV8(impl, creationContext, isolate);
627 } 636 }
628 637
629 {% endblock %} 638 {% endblock %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/unstable/v8_attributes.py ('k') | Source/bindings/tests/idls/TestInterfaceEventConstructor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698