OLD | NEW |
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 HEADLESS_PUBLIC_DOMAINS_TYPES_H_ | 7 #ifndef HEADLESS_PUBLIC_DOMAINS_TYPES_H_ |
8 #define HEADLESS_PUBLIC_DOMAINS_TYPES_H_ | 8 #define HEADLESS_PUBLIC_DOMAINS_TYPES_H_ |
9 | 9 |
10 #include "base/optional.h" | 10 #include "base/optional.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 {% endfor %} | 32 {% endfor %} |
33 } // namespace {{domain.domain}} | 33 } // namespace {{domain.domain}} |
34 {% endfor %} | 34 {% endfor %} |
35 | 35 |
36 {% for domain in api.domains %} | 36 {% for domain in api.domains %} |
37 namespace {{domain.domain | camelcase_to_hacker_style}} { | 37 namespace {{domain.domain | camelcase_to_hacker_style}} { |
38 {% for type in domain.types %} | 38 {% for type in domain.types %} |
39 {% if "enum" in type %} | 39 {% if "enum" in type %} |
40 enum class {{type.id}} { | 40 enum class {{type.id}} { |
41 {% for literal in type.enum %} | 41 {% for literal in type.enum %} |
42 {{ literal | dash_to_camelcase | camelcase_to_hacker_style | upper | mangle_en
um}}{{',' if not loop.last}} | 42 {{ literal | sanitize_literal | dash_to_camelcase | camelcase_to_hacker_style
| upper }}{{',' if not loop.last}} |
43 {% endfor %} | 43 {% endfor %} |
44 }; | 44 }; |
45 | 45 |
46 {% endif %} | 46 {% endif %} |
47 {% endfor %} | 47 {% endfor %} |
48 } // namespace {{domain.domain | camelcase_to_hacker_style}} | 48 } // namespace {{domain.domain | camelcase_to_hacker_style}} |
49 | 49 |
50 {% endfor %} | 50 {% endfor %} |
51 | 51 |
52 // ------------- Type and builder declarations. | 52 // ------------- Type and builder declarations. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 }; | 149 }; |
150 | 150 |
151 {% endfor %} | 151 {% endfor %} |
152 | 152 |
153 } // namespace {{domain.domain | camelcase_to_hacker_style}} | 153 } // namespace {{domain.domain | camelcase_to_hacker_style}} |
154 {% endfor %} | 154 {% endfor %} |
155 | 155 |
156 } // namespace headless | 156 } // namespace headless |
157 | 157 |
158 #endif // HEADLESS_PUBLIC_DOMAINS_TYPES_H_ | 158 #endif // HEADLESS_PUBLIC_DOMAINS_TYPES_H_ |
OLD | NEW |