| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! | 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 {% filter conditional(conditional_string) %} | 8 {% filter conditional(conditional_string) %} |
| 9 #include "{{v8_class}}.h" | 9 #include "{{v8_class}}.h" |
| 10 | 10 |
| 11 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} | 11 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} |
| 12 #include "{{filename}}" | 12 #include "{{filename}}" |
| 13 {% endfor %} | 13 {% endfor %} |
| 14 | 14 |
| 15 {% if is_script_wrappable %} | |
| 16 namespace blink { | |
| 17 | |
| 18 static void initializeScriptWrappableForInterface({{cpp_class}}* impl) | |
| 19 { | |
| 20 impl->setTypeInfo(&{{v8_class}}::wrapperTypeInfo); | |
| 21 } | |
| 22 | |
| 23 } // namespace blink | |
| 24 | |
| 25 {# | |
| 26 In ScriptWrappable::init, the use of a local function declaration has an | |
| 27 issue on Windows: the local declaration does not pick up the surrounding | |
| 28 namespace. Therefore, we provide this function in the global namespace. | |
| 29 More info on the MSVC bug here (Bug 664619): | |
| 30 The namespace of local function declarations in C++ by Uray M. János | |
| 31 http://connect.microsoft.com/VisualStudio/feedback/details/664619/the-namespace-
of-local-function-declarations-in-c | |
| 32 #} | |
| 33 void webCoreInitializeScriptWrappableForInterface(blink::{{cpp_class}}* object) | |
| 34 { | |
| 35 blink::initializeScriptWrappableForInterface(object); | |
| 36 } | |
| 37 | |
| 38 {% endif %} | |
| 39 namespace blink { | 15 namespace blink { |
| 40 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class | 16 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class |
| 41 if is_active_dom_object else '0' %} | 17 if is_active_dom_object else '0' %} |
| 42 {% set to_event_target = '%s::toEventTarget' % v8_class | 18 {% set to_event_target = '%s::toEventTarget' % v8_class |
| 43 if is_event_target else '0' %} | 19 if is_event_target else '0' %} |
| 44 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class | 20 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class |
| 45 if has_visit_dom_wrapper else '0' %} | 21 if has_visit_dom_wrapper else '0' %} |
| 46 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface | 22 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface |
| 47 if parent_interface else '0' %} | 23 if parent_interface else '0' %} |
| 48 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else | 24 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception
else |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 {{method_implemented_in_private_script(method)}} | 147 {{method_implemented_in_private_script(method)}} |
| 172 {% endfor %} | 148 {% endfor %} |
| 173 {% for attribute in attributes if attribute.is_implemented_in_private_script %} | 149 {% for attribute in attributes if attribute.is_implemented_in_private_script %} |
| 174 {{attribute_getter_implemented_in_private_script(attribute)}} | 150 {{attribute_getter_implemented_in_private_script(attribute)}} |
| 175 {% if not attribute.is_read_only or attribute.put_forwards %} | 151 {% if not attribute.is_read_only or attribute.put_forwards %} |
| 176 {{attribute_setter_implemented_in_private_script(attribute)}} | 152 {{attribute_setter_implemented_in_private_script(attribute)}} |
| 177 {% endif %} | 153 {% endif %} |
| 178 {% endfor %} | 154 {% endfor %} |
| 179 } // namespace blink | 155 } // namespace blink |
| 180 {% endfilter %} | 156 {% endfilter %} |
| OLD | NEW |