Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 {% filter format_blink_cpp_source_code %} | 1 {% filter format_blink_cpp_source_code %} |
| 2 | 2 |
| 3 {% include 'copyright_block.txt' %} | 3 {% include 'copyright_block.txt' %} |
| 4 #include "{{v8_class_or_partial}}.h" | 4 #include "{{v8_class_or_partial}}.h" |
| 5 | 5 |
| 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} | 6 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} |
| 7 #include "{{filename}}" | 7 #include "{{filename}}" |
| 8 {% endfor %} | 8 {% endfor %} |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 {{attribute_configuration(attribute)}}, | 223 {{attribute_configuration(attribute)}}, |
| 224 {% endfor %} | 224 {% endfor %} |
| 225 }; | 225 }; |
| 226 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 226 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 227 #pragma clang diagnostic pop | 227 #pragma clang diagnostic pop |
| 228 #endif | 228 #endif |
| 229 | 229 |
| 230 {% endif %} | 230 {% endif %} |
| 231 {% endblock %} | 231 {% endblock %} |
| 232 {##############################################################################} | 232 {##############################################################################} |
| 233 {% block install_lazy_data_attributes %} | |
| 234 {% from 'attributes.cpp.tmpl' import attribute_configuration with context %} | |
| 235 {% if attributes | has_lazy_data_configuration %} | |
| 236 // Suppress warning: global constructors, because AttributeConfiguration is triv ial | |
| 237 // and does not depend on another global objects. | |
| 238 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | |
| 239 #pragma clang diagnostic push | |
| 240 #pragma clang diagnostic ignored "-Wglobal-constructors" | |
| 241 #endif | |
| 242 const V8DOMConfiguration::AttributeConfiguration {{v8_class}}LazyAttributes[] = { | |
|
haraken
2016/11/01 07:17:31
LazyDataAttributes
jochen (gone - plz use gerrit)
2016/11/02 11:57:01
done
| |
| 243 {% for attribute in attributes | has_lazy_data_configuration %} | |
| 244 {{attribute_configuration(attribute)}}, | |
| 245 {% endfor %} | |
| 246 }; | |
| 247 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | |
| 248 #pragma clang diagnostic pop | |
| 249 #endif | |
| 250 | |
| 251 {% endif %} | |
| 252 {% endblock %} | |
| 253 {##############################################################################} | |
| 233 {% block install_accessors %} | 254 {% block install_accessors %} |
| 234 {% from 'attributes.cpp.tmpl' import attribute_configuration with context %} | 255 {% from 'attributes.cpp.tmpl' import attribute_configuration with context %} |
| 235 {% if attributes | has_accessor_configuration %} | 256 {% if attributes | has_accessor_configuration %} |
| 236 const V8DOMConfiguration::AccessorConfiguration {{v8_class}}Accessors[] = { | 257 const V8DOMConfiguration::AccessorConfiguration {{v8_class}}Accessors[] = { |
| 237 {% for attribute in attributes | has_accessor_configuration %} | 258 {% for attribute in attributes | has_accessor_configuration %} |
| 238 {{attribute_configuration(attribute)}}, | 259 {{attribute_configuration(attribute)}}, |
| 239 {% endfor %} | 260 {% endfor %} |
| 240 }; | 261 }; |
| 241 | 262 |
| 242 {% endif %} | 263 {% endif %} |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 298 {% endif %} | 319 {% endif %} |
| 299 | 320 |
| 300 // Register DOM constants, attributes and operations. | 321 // Register DOM constants, attributes and operations. |
| 301 {% filter runtime_enabled(runtime_enabled_function) %} | 322 {% filter runtime_enabled(runtime_enabled_function) %} |
| 302 {% if constants %} | 323 {% if constants %} |
| 303 {{install_constants() | indent(2)}} | 324 {{install_constants() | indent(2)}} |
| 304 {% endif %} | 325 {% endif %} |
| 305 {% if attributes | has_attribute_configuration %} | 326 {% if attributes | has_attribute_configuration %} |
| 306 V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, protot ypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}}); | 327 V8DOMConfiguration::installAttributes(isolate, world, instanceTemplate, protot ypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}}); |
| 307 {% endif %} | 328 {% endif %} |
| 329 {% if attributes | has_lazy_data_configuration %} | |
| 330 V8DOMConfiguration::installLazyDataAttributes(isolate, world, instanceTemplate , prototypeTemplate, {{'%sLazyAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sLa zyAttributes)' % v8_class}}); | |
| 331 {% endif %} | |
| 308 {% if attributes | has_accessor_configuration %} | 332 {% if attributes | has_accessor_configuration %} |
| 309 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, {{'%sAccessors' % v8_class}}, {{'WTF_A RRAY_LENGTH(%sAccessors)' % v8_class}}); | 333 V8DOMConfiguration::installAccessors(isolate, world, instanceTemplate, prototy peTemplate, interfaceTemplate, signature, {{'%sAccessors' % v8_class}}, {{'WTF_A RRAY_LENGTH(%sAccessors)' % v8_class}}); |
| 310 {% endif %} | 334 {% endif %} |
| 311 {% if methods | has_method_configuration(is_partial) %} | 335 {% if methods | has_method_configuration(is_partial) %} |
| 312 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARRAY _LENGTH(%sMethods)' % v8_class}}); | 336 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototype Template, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARRAY _LENGTH(%sMethods)' % v8_class}}); |
| 313 {% endif %} | 337 {% endif %} |
| 314 {% endfilter %} | 338 {% endfilter %} |
| 315 {%- if has_access_check_callbacks and not is_partial %}{{newline}} | 339 {%- if has_access_check_callbacks and not is_partial %}{{newline}} |
| 316 // Cross-origin access check | 340 // Cross-origin access check |
| 317 instanceTemplate->SetAccessCheckCallback({{cpp_class}}V8Internal::securityChec k, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrappe rTypeInfo))); | 341 instanceTemplate->SetAccessCheckCallback({{cpp_class}}V8Internal::securityChec k, v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrappe rTypeInfo))); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 451 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 475 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 452 {{attribute_getter_implemented_in_private_script(attribute)}} | 476 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 453 {% if attribute.has_setter %} | 477 {% if attribute.has_setter %} |
| 454 {{attribute_setter_implemented_in_private_script(attribute)}} | 478 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 455 {% endif %} | 479 {% endif %} |
| 456 {% endfor %} | 480 {% endfor %} |
| 457 {% block partial_interface %}{% endblock %} | 481 {% block partial_interface %}{% endblock %} |
| 458 } // namespace blink | 482 } // namespace blink |
| 459 | 483 |
| 460 {% endfilter %}{# format_blink_cpp_source_code #} | 484 {% endfilter %}{# format_blink_cpp_source_code #} |
| OLD | NEW |