| 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 16 matching lines...) Expand all Loading... |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 {# FIXME: Rename to Python when switch #} | 32 {# FIXME: Rename to Python when switch #} |
| 33 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 33 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 34 | 34 |
| 35 #include "config.h" | 35 #include "config.h" |
| 36 {% filter conditional(conditional_string) %} | 36 {% filter conditional(conditional_string) %} |
| 37 #include "{{v8_class_name}}.h" | 37 #include "{{v8_class}}.h" |
| 38 | 38 |
| 39 {% for filename in cpp_includes %} | 39 {% for filename in cpp_includes %} |
| 40 #include "{{filename}}" | 40 #include "{{filename}}" |
| 41 {% endfor %} | 41 {% endfor %} |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| 45 static void initializeScriptWrappableForInterface({{cpp_class_name}}* object) | 45 static void initializeScriptWrappableForInterface({{cpp_class}}* object) |
| 46 { | 46 { |
| 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 47 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
| 48 ScriptWrappable::setTypeInfoInObject(object, &{{v8_class_name}}::wrapper
TypeInfo); | 48 ScriptWrappable::setTypeInfoInObject(object, &{{v8_class}}::wrapperTypeI
nfo); |
| 49 else | 49 else |
| 50 ASSERT_NOT_REACHED(); | 50 ASSERT_NOT_REACHED(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace WebCore | 53 } // namespace WebCore |
| 54 | 54 |
| 55 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 55 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
| 56 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 56 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
| 57 // in the global namespace. | 57 // in the global namespace. |
| 58 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 58 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
| 59 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class_name}}* o
bject) | 59 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class}}* object
) |
| 60 { | 60 { |
| 61 WebCore::initializeScriptWrappableForInterface(object); | 61 WebCore::initializeScriptWrappableForInterface(object); |
| 62 } | 62 } |
| 63 | 63 |
| 64 namespace WebCore { | 64 namespace WebCore { |
| 65 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class_name | 65 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
| 66 if is_active_dom_object else '0' %} | 66 if is_active_dom_object else '0' %} |
| 67 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class_name | 67 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class |
| 68 if has_visit_dom_wrapper else '0' %} | 68 if has_visit_dom_wrapper else '0' %} |
| 69 const WrapperTypeInfo {{v8_class_name}}::wrapperTypeInfo = { gin::kEmbedderBlink
, {{v8_class_name}}::GetTemplate, {{v8_class_name}}::derefObject, {{to_active_do
m_object}}, 0, {{visit_dom_wrapper}}, {{v8_class_name}}::installPerContextEnable
dMethods, 0, WrapperTypeObjectPrototype }; | 69 const WrapperTypeInfo {{v8_class}}::wrapperTypeInfo = { gin::kEmbedderBlink, {{v
8_class}}::GetTemplate, {{v8_class}}::derefObject, {{to_active_dom_object}}, 0,
{{visit_dom_wrapper}}, {{v8_class}}::installPerContextEnabledMethods, 0, Wrapper
TypeObjectPrototype }; |
| 70 | 70 |
| 71 namespace {{cpp_class_name}}V8Internal { | 71 namespace {{cpp_class}}V8Internal { |
| 72 | 72 |
| 73 template <typename T> void V8_USE(T) { } | 73 template <typename T> void V8_USE(T) { } |
| 74 | 74 |
| 75 {# Attributes #} | 75 {# Attributes #} |
| 76 {% from 'attributes.cpp' import attribute_getter, attribute_getter_callback, | 76 {% from 'attributes.cpp' import attribute_getter, attribute_getter_callback, |
| 77 attribute_setter, attribute_setter_callback | 77 attribute_setter, attribute_setter_callback |
| 78 with context %} | 78 with context %} |
| 79 {% for attribute in attributes if not attribute.constructor_type %} | 79 {% for attribute in attributes if not attribute.constructor_type %} |
| 80 {% for world_suffix in attribute.world_suffixes %} | 80 {% for world_suffix in attribute.world_suffixes %} |
| 81 {% if not attribute.has_custom_getter %} | 81 {% if not attribute.has_custom_getter %} |
| (...skipping 25 matching lines...) Expand all Loading... |
| 107 {% if not method.overload_index or method.overloads %} | 107 {% if not method.overload_index or method.overloads %} |
| 108 {# A single callback is generated for overloaded methods #} | 108 {# A single callback is generated for overloaded methods #} |
| 109 {{method_callback(method, world_suffix)}} | 109 {{method_callback(method, world_suffix)}} |
| 110 {% endif %} | 110 {% endif %} |
| 111 {% if method.is_do_not_check_security %} | 111 {% if method.is_do_not_check_security %} |
| 112 {{origin_safe_method_getter(method, world_suffix)}} | 112 {{origin_safe_method_getter(method, world_suffix)}} |
| 113 {% endif %} | 113 {% endif %} |
| 114 {% endfor %} | 114 {% endfor %} |
| 115 {% endfor %} | 115 {% endfor %} |
| 116 {% block origin_safe_method_setter %}{% endblock %} | 116 {% block origin_safe_method_setter %}{% endblock %} |
| 117 } // namespace {{cpp_class_name}}V8Internal | 117 } // namespace {{cpp_class}}V8Internal |
| 118 | 118 |
| 119 {% block visit_dom_wrapper %}{% endblock %} | 119 {% block visit_dom_wrapper %}{% endblock %} |
| 120 {% block class_attributes %}{% endblock %} | 120 {% block class_attributes %}{% endblock %} |
| 121 {% block class_accessors %}{% endblock %} | 121 {% block class_accessors %}{% endblock %} |
| 122 {% block class_methods %}{% endblock %} | 122 {% block class_methods %}{% endblock %} |
| 123 {% block configure_class_template %}{% endblock %} | 123 {% block configure_class_template %}{% endblock %} |
| 124 {% block get_template %}{% endblock %} | 124 {% block get_template %}{% endblock %} |
| 125 {% block has_instance_and_has_instance_in_any_world %}{% endblock %} | 125 {% block has_instance_and_has_instance_in_any_world %}{% endblock %} |
| 126 {% block install_per_context_attributes %}{% endblock %} | 126 {% block install_per_context_attributes %}{% endblock %} |
| 127 {% block install_per_context_methods %}{% endblock %} | 127 {% block install_per_context_methods %}{% endblock %} |
| 128 {% block to_active_dom_object %}{% endblock %} | 128 {% block to_active_dom_object %}{% endblock %} |
| 129 {% block create_wrapper_and_deref_object %}{% endblock %} | 129 {% block create_wrapper_and_deref_object %}{% endblock %} |
| 130 } // namespace WebCore | 130 } // namespace WebCore |
| 131 {% endfilter %} | 131 {% endfilter %} |
| OLD | NEW |