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

Unified Diff: headless/lib/browser/devtools_api/domain_types_forward_declaration_h.template

Issue 2473073003: [headless] Refactor headless devtools client API. (Closed)
Patch Set: Address nits 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 side-by-side diff with in-line comments
Download patch
Index: headless/lib/browser/devtools_api/domain_types_forward_declaration_h.template
diff --git a/headless/lib/browser/devtools_api/domain_types_forward_declaration_h.template b/headless/lib/browser/devtools_api/domain_types_forward_declaration_h.template
new file mode 100644
index 0000000000000000000000000000000000000000..4bb223b04abf13c63046ff083b5f9678c4289a4d
--- /dev/null
+++ b/headless/lib/browser/devtools_api/domain_types_forward_declaration_h.template
@@ -0,0 +1,44 @@
+// This file is generated
+
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATION_{{domain.domain | camelcase_to_hacker_style | upper}}_H_
+#define HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATION_{{domain.domain | camelcase_to_hacker_style | upper}}_H_
+
+#include "base/optional.h"
+#include "base/values.h"
+#include "headless/public/headless_export.h"
+#include "headless/public/util/error_reporter.h"
+
+#include "base/memory/ptr_util.h"
+
+namespace headless {
+
+namespace {{domain.domain | camelcase_to_hacker_style}} {
+{% for type in domain.types %}
+ {% if type.type == "object" %}
+ {% if "properties" in type %}
+class {{type.id}};
+ {% else %}
+using {{type.id}} = base::Value;
+ {% endif %}
+ {% endif %}
+{% endfor %}
+
+{% for type in domain.types %}
+ {% if "enum" in type %}
+enum class {{type.id}} {
+ {% for literal in type.enum %}
+ {{ literal | sanitize_literal | dash_to_camelcase | camelcase_to_hacker_style | upper }}{{',' if not loop.last}}
+ {% endfor %}
+};
+
+ {% endif %}
+{% endfor %}
+} // namespace {{domain.domain | camelcase_to_hacker_style}}
+
+} // namespace headless
+
+#endif // HEADLESS_PUBLIC_DEVTOOLS_INTERNAL_TYPES_FORWARD_DECLARATION_{{domain.domain | camelcase_to_hacker_style | upper}}_H_
« no previous file with comments | « headless/lib/browser/devtools_api/domain_types_cc.template ('k') | headless/lib/browser/devtools_api/domain_types_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698