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

Side by Side Diff: third_party/inspector_protocol/templates/Imported_h.template

Issue 2523743003: Roll third_party/inspector_protocol to 73028acaa3646789fd2a3bfd0d79eb2d91b696b3 (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 // This file is generated 1 // This file is generated
2 2
3 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 3 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be 4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file. 5 // found in the LICENSE file.
6 6
7 #ifndef {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_imported_h 7 #ifndef {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_imported_h
8 #define {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_imported_h 8 #define {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_imported_h
9 9
10 #include "{{config.protocol.package}}/Protocol.h" 10 #include {{format_include(config.protocol.package, "Protocol")}}
11 #include {{format_include(config.imported.header if config.imported.header else "\"%s/%s.h\"" % (config.imported.package, domain.domain))}} 11 {% if config.imported.header %}
12 #include {{format_include(config.imported.header)}}
13 {% else %}
14 #include {{format_include(config.imported.package, domain.domain)}}
15 {% endif %}
12 16
13 {% for namespace in config.protocol.namespace %} 17 {% for namespace in config.protocol.namespace %}
14 namespace {{namespace}} { 18 namespace {{namespace}} {
15 {% endfor %} 19 {% endfor %}
16 {% for type in domain.types %} 20 {% for type in domain.types %}
17 {% if not (type.type == "object") or not ("properties" in type) or not (type .exported) %}{% continue %}{% endif %} 21 {% if not (type.type == "object") or not ("properties" in type) or not (type .exported) %}{% continue %}{% endif %}
18 22
19 template<> 23 template<>
20 struct ValueConversions<{{"::".join(config.imported.namespace)}}::{{domain.domai n}}::API::{{type.id}}> { 24 struct ValueConversions<{{"::".join(config.imported.namespace)}}::{{domain.domai n}}::API::{{type.id}}> {
21 static std::unique_ptr<{{"::".join(config.imported.namespace)}}::{{domain.do main}}::API::{{type.id}}> parse(protocol::Value* value, ErrorSupport* errors) 25 static std::unique_ptr<{{"::".join(config.imported.namespace)}}::{{domain.do main}}::API::{{type.id}}> parse(protocol::Value* value, ErrorSupport* errors)
(...skipping 20 matching lines...) Expand all
42 return serialize(value.get()); 46 return serialize(value.get());
43 } 47 }
44 }; 48 };
45 {% endfor %} 49 {% endfor %}
46 50
47 {% for namespace in config.protocol.namespace %} 51 {% for namespace in config.protocol.namespace %}
48 } // namespace {{namespace}} 52 } // namespace {{namespace}}
49 {% endfor %} 53 {% endfor %}
50 54
51 #endif // !defined({{"_".join(config.protocol.namespace)}}_{{domain.domain}}_imp orted_h) 55 #endif // !defined({{"_".join(config.protocol.namespace)}}_{{domain.domain}}_imp orted_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698