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

Side by Side Diff: Source/build/scripts/templates/ElementWrapperFactory.cpp.tmpl

Issue 172033002: Remove WrapperTypeTraits (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/v8/custom/V8Uint8ClampedArrayCustom.h ('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 {% from "macros.tmpl" import license -%} 1 {% from "macros.tmpl" import license -%}
2 {{ license() }} 2 {{ license() }}
3 3
4 #include "config.h" 4 #include "config.h"
5 #include "V8{{namespace}}ElementWrapperFactory.h" 5 #include "V8{{namespace}}ElementWrapperFactory.h"
6 6
7 #include "RuntimeEnabledFeatures.h" 7 #include "RuntimeEnabledFeatures.h"
8 #include "{{namespace}}Names.h" 8 #include "{{namespace}}Names.h"
9 #include "bindings/v8/CustomElementWrapper.h" 9 #include "bindings/v8/CustomElementWrapper.h"
10 {%- for tag in tags|sort if tag.has_js_interface %} 10 {%- for tag in tags|sort if tag.has_js_interface %}
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 const WrapperTypeInfo* findWrapperTypeFor{{namespace}}TagName(const AtomicString & name) 74 const WrapperTypeInfo* findWrapperTypeFor{{namespace}}TagName(const AtomicString & name)
75 { 75 {
76 typedef HashMap<StringImpl*, const WrapperTypeInfo*> NameTypeMap; 76 typedef HashMap<StringImpl*, const WrapperTypeInfo*> NameTypeMap;
77 DEFINE_STATIC_LOCAL(NameTypeMap, map, ()); 77 DEFINE_STATIC_LOCAL(NameTypeMap, map, ());
78 if (map.isEmpty()) { 78 if (map.isEmpty()) {
79 // FIXME: This seems wrong. We should list every interface here, not 79 // FIXME: This seems wrong. We should list every interface here, not
80 // just the ones that have specialized JavaScript interfaces. 80 // just the ones that have specialized JavaScript interfaces.
81 {%- for tag in tags|sort if tag.has_js_interface %} 81 {%- for tag in tags|sort if tag.has_js_interface %}
82 map.set({{tag|symbol}}Tag.localName().impl(), WrapperTypeTraits<{{tag.js _interface}}>::wrapperTypeInfo()); 82 map.set({{tag|symbol}}Tag.localName().impl(), &V8{{tag.js_interface}}::w rapperTypeInfo);
83 {%- endfor %} 83 {%- endfor %}
84 } 84 }
85 85
86 if (const WrapperTypeInfo* result = map.get(name.impl())) 86 if (const WrapperTypeInfo* result = map.get(name.impl()))
87 return result; 87 return result;
88 88
89 return WrapperTypeTraits<{{fallback_js_interface}}>::wrapperTypeInfo(); 89 return &V8{{fallback_js_interface}}::wrapperTypeInfo;
90 } 90 }
91 91
92 } 92 }
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8Uint8ClampedArrayCustom.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698