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_DEVTOOLS_DOMAINS_{{domain.domain | camelcase_to_hacker_s
tyle | upper}}_H_ | 7 #ifndef HEADLESS_PUBLIC_DEVTOOLS_DOMAINS_{{domain.domain | camelcase_to_hacker_s
tyle | upper}}_H_ |
8 #define HEADLESS_PUBLIC_DEVTOOLS_DOMAINS_{{domain.domain | camelcase_to_hacker_s
tyle | upper}}_H_ | 8 #define HEADLESS_PUBLIC_DEVTOOLS_DOMAINS_{{domain.domain | camelcase_to_hacker_s
tyle | upper}}_H_ |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 {# If the command has no return value, generate a convenience method that #} | 43 {# If the command has no return value, generate a convenience method that #} |
44 {# accepts a base::Callback<void()> together with the parameters object. #} | 44 {# accepts a base::Callback<void()> together with the parameters object. #} |
45 {% if not command.get("returns", []) %} | 45 {% if not command.get("returns", []) %} |
46 void {{method_name}}(std::unique_ptr<{{method_name}}Params> params, base::Call
back<void()> callback); | 46 void {{method_name}}(std::unique_ptr<{{method_name}}Params> params, base::Call
back<void()> callback); |
47 {% endif %} | 47 {% endif %} |
48 {% endif %} | 48 {% endif %} |
49 {% endmacro %} | 49 {% endmacro %} |
50 | 50 |
51 namespace headless { | 51 namespace headless { |
52 namespace {{domain.domain | camelcase_to_hacker_style}} { | 52 namespace {{domain.domain | camelcase_to_hacker_style}} { |
53 class ExperimentalDomain; | 53 class HEADLESS_EXPORT ExperimentalDomain; |
54 class ExperimentalObserver; | 54 class HEADLESS_EXPORT ExperimentalObserver; |
55 {% if "events" in domain %} | 55 {% if "events" in domain %} |
56 | 56 |
57 class HEADLESS_EXPORT ExperimentalObserver { | 57 class HEADLESS_EXPORT ExperimentalObserver { |
58 public: | 58 public: |
59 virtual ~ExperimentalObserver() {} | 59 virtual ~ExperimentalObserver() {} |
60 {% for event in domain.events %} | 60 {% for event in domain.events %} |
61 {% if event.description %} | 61 {% if event.description %} |
62 // {{event.description}} | 62 // {{event.description}} |
63 {% endif %} | 63 {% endif %} |
64 virtual void On{{event.name | to_title_case}}(const {{event.name | to_title_ca
se}}Params& params) {} | 64 virtual void On{{event.name | to_title_case}}(const {{event.name | to_title_ca
se}}Params& params) {} |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 {% endfor %} | 157 {% endfor %} |
158 | 158 |
159 private: | 159 private: |
160 DISALLOW_COPY_AND_ASSIGN(ExperimentalDomain); | 160 DISALLOW_COPY_AND_ASSIGN(ExperimentalDomain); |
161 }; | 161 }; |
162 | 162 |
163 } // namespace {{domain.domain | camelcase_to_hacker_style}} | 163 } // namespace {{domain.domain | camelcase_to_hacker_style}} |
164 } // namespace headless | 164 } // namespace headless |
165 | 165 |
166 #endif // HEADLESS_PUBLIC_DEVTOOLS_DOMAINS_{{domain.domain | camelcase_to_hacke
r_style | upper}}_H_ | 166 #endif // HEADLESS_PUBLIC_DEVTOOLS_DOMAINS_{{domain.domain | camelcase_to_hacke
r_style | upper}}_H_ |
OLD | NEW |