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

Side by Side Diff: third_party/WebKit/Source/build/scripts/templates/MakeQualifiedNames.h.tmpl

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 {% from "macros.tmpl" import license %} 1 {% from "macros.tmpl" import license %}
2 {{ license() }} 2 {{ license() }}
3 3
4 #ifndef {{namespace}}Names_h 4 #ifndef {{namespace}}Names_h
5 #define {{namespace}}Names_h 5 #define {{namespace}}Names_h
6 6
7 {% if export == 'CORE_EXPORT' %} 7 {% if export == 'CORE_EXPORT' %}
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 {% endif %} 9 {% endif %}
10 #include "core/dom/QualifiedName.h" 10 #include "core/dom/QualifiedName.h"
11 #include <memory> 11 #include "wtf/PassOwnPtr.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class {{namespace}}QualifiedName : public QualifiedName { }; 15 class {{namespace}}QualifiedName : public QualifiedName { };
16 16
17 namespace {{namespace}}Names { 17 namespace {{namespace}}Names {
18 18
19 {% set symbol_export = '%s ' % export if export else '' %} 19 {% set symbol_export = '%s ' % export if export else '' %}
20 // Namespace 20 // Namespace
21 {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceUR I; 21 {{symbol_export}}extern const WTF::AtomicString& {{namespace_prefix}}NamespaceUR I;
22 22
23 // Tags 23 // Tags
24 {% for tag in tags|sort %} 24 {% for tag in tags|sort %}
25 {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}T ag; 25 {{symbol_export}}extern const blink::{{namespace}}QualifiedName& {{tag|symbol}}T ag;
26 {% endfor %} 26 {% endfor %}
27 27
28 // Attributes 28 // Attributes
29 {% for attr in attrs|sort %} 29 {% for attr in attrs|sort %}
30 {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr; 30 {{symbol_export}}extern const blink::QualifiedName& {{attr|symbol}}Attr;
31 {% endfor %} 31 {% endfor %}
32 32
33 {% if tags %} 33 {% if tags %}
34 const unsigned {{namespace}}TagsCount = {{tags|count}}; 34 const unsigned {{namespace}}TagsCount = {{tags|count}};
35 {{symbol_export}}std::unique_ptr<const {{namespace}}QualifiedName*[]> get{{names pace}}Tags(); 35 {{symbol_export}}PassOwnPtr<const {{namespace}}QualifiedName*[]> get{{namespace} }Tags();
36 {% endif %} 36 {% endif %}
37 37
38 const unsigned {{namespace}}AttrsCount = {{attrs|count}}; 38 const unsigned {{namespace}}AttrsCount = {{attrs|count}};
39 {% if namespace != 'HTML' %} 39 {% if namespace != 'HTML' %}
40 std::unique_ptr<const QualifiedName*[]> get{{namespace}}Attrs(); 40 PassOwnPtr<const QualifiedName*[]> get{{namespace}}Attrs();
41 {% endif %} 41 {% endif %}
42 42
43 void init(); 43 void init();
44 44
45 } // {{namespace}}Names 45 } // {{namespace}}Names
46 } // namespace blink 46 } // namespace blink
47 47
48 #endif 48 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698