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

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

Issue 196653003: Add [DoNotGenerateClassBindings] extended attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Compiles and links Created 6 years, 9 months 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 22 matching lines...) Expand all
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}}.h" 37 #include "{{v8_class}}.h"
38 38
39 {% for filename in cpp_includes if filename != '%s.h' % v8_class %} 39 {% for filename in cpp_includes if filename != '%s.h' % v8_class %}
40 #include "{{filename}}" 40 #include "{{filename}}"
41 {% endfor %} 41 {% endfor %}
42 42
43 {% if has_class_bindings %}
43 namespace WebCore { 44 namespace WebCore {
44 45
45 static void initializeScriptWrappableForInterface({{cpp_class}}* object) 46 static void initializeScriptWrappableForInterface({{cpp_class}}* object)
46 { 47 {
47 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 48 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
48 ScriptWrappable::setTypeInfoInObject(object, &{{v8_class}}::wrapperTypeI nfo); 49 ScriptWrappable::setTypeInfoInObject(object, &{{v8_class}}::wrapperTypeI nfo);
49 else 50 else
50 ASSERT_NOT_REACHED(); 51 ASSERT_NOT_REACHED();
51 } 52 }
52 53
53 } // namespace WebCore 54 } // namespace WebCore
54 55
55 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows: 56 // 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 57 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
57 // in the global namespace. 58 // 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) 59 // (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}}* object ) 60 void webCoreInitializeScriptWrappableForInterface(WebCore::{{cpp_class}}* object )
60 { 61 {
61 WebCore::initializeScriptWrappableForInterface(object); 62 WebCore::initializeScriptWrappableForInterface(object);
62 } 63 }
63 64
65 {% endif %}
64 namespace WebCore { 66 namespace WebCore {
65 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class 67 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class
66 if is_active_dom_object else '0' %} 68 if is_active_dom_object else '0' %}
67 {% set to_event_target = '%s::toEventTarget' % v8_class 69 {% set to_event_target = '%s::toEventTarget' % v8_class
68 if is_event_target else '0' %} 70 if is_event_target else '0' %}
69 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class 71 {% set visit_dom_wrapper = '%s::visitDOMWrapper' % v8_class
70 if has_visit_dom_wrapper else '0' %} 72 if has_visit_dom_wrapper else '0' %}
71 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface 73 {% set parent_wrapper_type_info = '&V8%s::wrapperTypeInfo' % parent_interface
72 if parent_interface else '0' %} 74 if parent_interface else '0' %}
73 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else 75 {% set wrapper_type_prototype = 'WrapperTypeExceptionPrototype' if is_exception else
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 {% block get_template %}{% endblock %} 169 {% block get_template %}{% endblock %}
168 {% block has_instance %}{% endblock %} 170 {% block has_instance %}{% endblock %}
169 {% block to_native_with_type_check %}{% endblock %} 171 {% block to_native_with_type_check %}{% endblock %}
170 {% block install_per_context_attributes %}{% endblock %} 172 {% block install_per_context_attributes %}{% endblock %}
171 {% block install_per_context_methods %}{% endblock %} 173 {% block install_per_context_methods %}{% endblock %}
172 {% block to_active_dom_object %}{% endblock %} 174 {% block to_active_dom_object %}{% endblock %}
173 {% block to_event_target %}{% endblock %} 175 {% block to_event_target %}{% endblock %}
174 {% block get_shadow_object_template %}{% endblock %} 176 {% block get_shadow_object_template %}{% endblock %}
175 {% block wrap %}{% endblock %} 177 {% block wrap %}{% endblock %}
176 {% block create_wrapper %}{% endblock %} 178 {% block create_wrapper %}{% endblock %}
177 {% block deref_object_and_to_v8_no_inline %}{% endblock %} 179 {% block deref_object %}{% endblock %}
180 {% block to_v8_no_inline %}{% endblock %}
178 } // namespace WebCore 181 } // namespace WebCore
179 {% endfilter %} 182 {% endfilter %}
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