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

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

Issue 68733006: IDL compiler: Refactor attribute configuration from Python CG to Jinja template (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revised 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
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {# http://www.chromium.org/blink/coding-style#TOC-License #} 1 {# http://www.chromium.org/blink/coding-style#TOC-License #}
2 /* 2 /*
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const WrapperTypeInfo {{v8_class_name}}::wrapperTypeInfo = { {{v8_class_name}}:: GetTemplate, {{v8_class_name}}::derefObject, 0, 0, 0, {{v8_class_name}}::install PerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype }; 67 const WrapperTypeInfo {{v8_class_name}}::wrapperTypeInfo = { {{v8_class_name}}:: GetTemplate, {{v8_class_name}}::derefObject, 0, 0, 0, {{v8_class_name}}::install PerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype };
68 68
69 namespace {{cpp_class_name}}V8Internal { 69 namespace {{cpp_class_name}}V8Internal {
70 70
71 template <typename T> void V8_USE(T) { } 71 template <typename T> void V8_USE(T) { }
72 72
73 {# Attributes #} 73 {# Attributes #}
74 {% from 'attributes.cpp' import attribute_getter, attribute_getter_callback, 74 {% from 'attributes.cpp' import attribute_getter, attribute_getter_callback,
75 attribute_setter, attribute_setter_callback 75 attribute_setter, attribute_setter_callback
76 with context %} 76 with context %}
77 {% for attribute in attributes if not attribute.is_constructor %} 77 {% for attribute in attributes if not attribute.constructor_type %}
78 {% for world_suffix in attribute.world_suffixes %} 78 {% for world_suffix in attribute.world_suffixes %}
79 {% if not attribute.has_custom_getter %} 79 {% if not attribute.has_custom_getter %}
80 {{attribute_getter(attribute, world_suffix)}} 80 {{attribute_getter(attribute, world_suffix)}}
81 {% endif %} 81 {% endif %}
82 {{attribute_getter_callback(attribute, world_suffix)}} 82 {{attribute_getter_callback(attribute, world_suffix)}}
83 {% if not attribute.is_read_only %} 83 {% if not attribute.is_read_only %}
84 {% if not attribute.has_custom_setter %} 84 {% if not attribute.has_custom_setter %}
85 {{attribute_setter(attribute, world_suffix)}} 85 {{attribute_setter(attribute, world_suffix)}}
86 {% endif %} 86 {% endif %}
87 {{attribute_setter_callback(attribute, world_suffix)}} 87 {{attribute_setter_callback(attribute, world_suffix)}}
(...skipping 27 matching lines...) Expand all
115 {% block get_template %}{% endblock %} 115 {% block get_template %}{% endblock %}
116 {% block has_instance_and_has_instance_in_any_world %}{% endblock %} 116 {% block has_instance_and_has_instance_in_any_world %}{% endblock %}
117 {% block install_per_context_attributes %}{% endblock %} 117 {% block install_per_context_attributes %}{% endblock %}
118 {% block install_per_context_methods %}{% endblock %} 118 {% block install_per_context_methods %}{% endblock %}
119 {% block create_wrapper_and_deref_object %}{% endblock %} 119 {% block create_wrapper_and_deref_object %}{% endblock %}
120 } // namespace WebCore 120 } // namespace WebCore
121 {% if conditional_string %} 121 {% if conditional_string %}
122 122
123 #endif // {{conditional_string}} 123 #endif // {{conditional_string}}
124 {% endif %} 124 {% endif %}
OLDNEW
« no previous file with comments | « Source/bindings/templates/interface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698