| 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 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_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATIONS_{{domain.do
main | camelcase_to_hacker_style | upper}}_H_ | 7 #ifndef HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATIONS_{{domain.do
main | camelcase_to_hacker_style | upper}}_H_ |
| 8 #define HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATIONS_{{domain.do
main | camelcase_to_hacker_style | upper}}_H_ | 8 #define HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATIONS_{{domain.do
main | camelcase_to_hacker_style | upper}}_H_ |
| 9 | 9 |
| 10 #include "base/optional.h" | |
| 11 #include "base/values.h" | 10 #include "base/values.h" |
| 12 #include "headless/public/headless_export.h" | |
| 13 #include "headless/public/util/error_reporter.h" | |
| 14 | |
| 15 #include "base/memory/ptr_util.h" | |
| 16 | 11 |
| 17 namespace headless { | 12 namespace headless { |
| 18 | 13 |
| 19 namespace {{domain.domain | camelcase_to_hacker_style}} { | 14 namespace {{domain.domain | camelcase_to_hacker_style}} { |
| 20 {% for type in domain.types %} | 15 {% for type in domain.types %} |
| 21 {% if type.type == "object" %} | 16 {% if type.type == "object" %} |
| 22 {% if "properties" in type %} | 17 {% if "properties" in type %} |
| 23 class {{type.id}}; | 18 class {{type.id}}; |
| 24 {% else %} | 19 {% else %} |
| 25 using {{type.id}} = base::Value; | 20 using {{type.id}} = base::Value; |
| 26 {% endif %} | 21 {% endif %} |
| 27 {% endif %} | 22 {% endif %} |
| 28 {% endfor %} | 23 {% endfor %} |
| 29 | 24 |
| 30 {% for type in domain.types %} | 25 {% for type in domain.types %} |
| 31 {% if "enum" in type %} | 26 {% if "enum" in type %} |
| 32 enum class {{type.id}} { | 27 enum class {{type.id}} { |
| 33 {% for literal in type.enum %} | 28 {% for literal in type.enum %} |
| 34 {{ literal | sanitize_literal | dash_to_camelcase | camelcase_to_hacker_style
| upper }}{{',' if not loop.last}} | 29 {{ literal | sanitize_literal | dash_to_camelcase | camelcase_to_hacker_style
| upper }}{{',' if not loop.last}} |
| 35 {% endfor %} | 30 {% endfor %} |
| 36 }; | 31 }; |
| 37 | 32 |
| 38 {% endif %} | 33 {% endif %} |
| 39 {% endfor %} | 34 {% endfor %} |
| 40 } // namespace {{domain.domain | camelcase_to_hacker_style}} | 35 } // namespace {{domain.domain | camelcase_to_hacker_style}} |
| 41 | 36 |
| 42 } // namespace headless | 37 } // namespace headless |
| 43 | 38 |
| 44 #endif // HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATIONS_{{domain
.domain | camelcase_to_hacker_style | upper}}_H_ | 39 #endif // HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATIONS_{{domain
.domain | camelcase_to_hacker_style | upper}}_H_ |
| OLD | NEW |