| OLD | NEW |
| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 57 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
| 58 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 58 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
| 59 // in the global namespace. | 59 // in the global namespace. |
| 60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| 61 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class_name}}* o
bject) | 61 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class_name}}* o
bject) |
| 62 { | 62 { |
| 63 WebCore::initializeScriptWrappableForInterface(object); | 63 WebCore::initializeScriptWrappableForInterface(object); |
| 64 } | 64 } |
| 65 | 65 |
| 66 namespace WebCore { | 66 namespace WebCore { |
| 67 const WrapperTypeInfo {{v8_class_name}}::wrapperTypeInfo = { {{v8_class_name}}::
GetTemplate, {{v8_class_name}}::derefObject, 0, 0, 0, {{v8_class_name}}::install
PerContextEnabledMethods, 0, WrapperTypeObjectPrototype }; | 67 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class_name |
| 68 if is_active_dom_object else '0' %} |
| 69 const WrapperTypeInfo {{v8_class_name}}::wrapperTypeInfo = { {{v8_class_name}}::
GetTemplate, {{v8_class_name}}::derefObject, {{to_active_dom_object}}, 0, 0, {{v
8_class_name}}::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype }
; |
| 68 | 70 |
| 69 namespace {{cpp_class_name}}V8Internal { | 71 namespace {{cpp_class_name}}V8Internal { |
| 70 | 72 |
| 71 template <typename T> void V8_USE(T) { } | 73 template <typename T> void V8_USE(T) { } |
| 72 | 74 |
| 73 {# Attributes #} | 75 {# Attributes #} |
| 74 {% from 'attributes.cpp' import attribute_getter, attribute_getter_callback, | 76 {% from 'attributes.cpp' import attribute_getter, attribute_getter_callback, |
| 75 attribute_setter, attribute_setter_callback | 77 attribute_setter, attribute_setter_callback |
| 76 with context %} | 78 with context %} |
| 77 {% for attribute in attributes if not attribute.constructor_type %} | 79 {% for attribute in attributes if not attribute.constructor_type %} |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } // namespace {{cpp_class_name}}V8Internal | 112 } // namespace {{cpp_class_name}}V8Internal |
| 111 | 113 |
| 112 {% block class_attributes %}{% endblock %} | 114 {% block class_attributes %}{% endblock %} |
| 113 {% block class_accessors %}{% endblock %} | 115 {% block class_accessors %}{% endblock %} |
| 114 {% block class_methods %}{% endblock %} | 116 {% block class_methods %}{% endblock %} |
| 115 {% block configure_class_template %}{% endblock %} | 117 {% block configure_class_template %}{% endblock %} |
| 116 {% block get_template %}{% endblock %} | 118 {% block get_template %}{% endblock %} |
| 117 {% block has_instance_and_has_instance_in_any_world %}{% endblock %} | 119 {% block has_instance_and_has_instance_in_any_world %}{% endblock %} |
| 118 {% block install_per_context_attributes %}{% endblock %} | 120 {% block install_per_context_attributes %}{% endblock %} |
| 119 {% block install_per_context_methods %}{% endblock %} | 121 {% block install_per_context_methods %}{% endblock %} |
| 122 {% block to_active_dom_object %}{% endblock %} |
| 120 {% block create_wrapper_and_deref_object %}{% endblock %} | 123 {% block create_wrapper_and_deref_object %}{% endblock %} |
| 121 } // namespace WebCore | 124 } // namespace WebCore |
| 122 {% if conditional_string %} | 125 {% if conditional_string %} |
| 123 | 126 |
| 124 #endif // {{conditional_string}} | 127 #endif // {{conditional_string}} |
| 125 {% endif %} | 128 {% endif %} |
| OLD | NEW |