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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template

Issue 2248783003: [DevTools] Refactor CodeGenerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: up_to_date fix Created 4 years, 4 months 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: third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
index eb7fe2f6d7a90c5fdab95c3e0da18ac52673ee89..1b421d64a2c8d7f7c5257a82aaae9ae6d10d6ad7 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_h.template
@@ -7,15 +7,15 @@
#ifndef protocol_{{domain.domain}}_h
#define protocol_{{domain.domain}}_h
-#include "{{export_macro_include}}"
-#include "{{lib_package}}/InspectorProtocol.h"
+#include "{{config.class_export.header}}"
+#include "{{config.lib_package}}/InspectorProtocol.h"
// For each imported domain we generate a ValueConversions struct instead of a full domain definition
// and include Domain::API version from there.
{% for name in domain.dependencies %}
-#include "{{output_package}}/{{name}}.h"
+#include "{{config.protocol.package}}/{{name}}.h"
{% endfor %}
{% if domain["has_exports"] %}
-#include "{{exported_package}}/{{domain.domain}}.h"
+#include "{{config.exported.package}}/{{domain.domain}}.h"
{% endif %}
namespace blink {
@@ -42,7 +42,7 @@ using {{type.id}} = {{resolve_type(type).type}};
namespace {{type.id}}Enum {
{% for literal in type.enum %}
-{{export_macro}} extern const char* {{ literal | dash_to_camelcase}};
+{{config.class_export.macro}} extern const char* {{ literal | dash_to_camelcase}};
{% endfor %}
} // namespace {{type.id}}Enum
{% endif %}
@@ -54,7 +54,7 @@ namespace {{type.id}}Enum {
namespace {{command.name | to_title_case}} {
namespace {{param.name | to_title_case}}Enum {
{% for literal in param.enum %}
-{{export_macro}} extern const char* {{ literal | dash_to_camelcase}};
+{{config.class_export.macro}} extern const char* {{literal | dash_to_camelcase}};
{% endfor %}
} // {{param.name | to_title_case}}Enum
} // {{command.name | to_title_case }}
@@ -68,7 +68,7 @@ namespace {{param.name | to_title_case}}Enum {
{% set type_def = type_definition(domain.domain + "." + type.id)%}
// {{type.description}}
-class {{export_macro}} {{type.id}} {% if type.exported %}: public API::{{type.id}} {% endif %}{
+class {{config.class_export.macro}} {{type.id}} {% if type.exported %}: public API::{{type.id}} {% endif %}{
PROTOCOL_DISALLOW_COPY({{type.id}});
public:
static std::unique_ptr<{{type.id}}> parse(protocol::Value* value, ErrorSupport* errors);
@@ -77,9 +77,9 @@ public:
{% for property in type.properties %}
{% if "enum" in property %}
- struct {{export_macro}} {{property.name | to_title_case}}Enum {
+ struct {{config.class_export.macro}} {{property.name | to_title_case}}Enum {
{% for literal in property.enum %}
- static const char* {{ literal | dash_to_camelcase}};
+ static const char* {{literal | dash_to_camelcase}};
{% endfor %}
}; // {{property.name | to_title_case}}Enum
{% endif %}
@@ -180,13 +180,13 @@ private:
// ------------- Backend interface.
-class {{export_macro}} Backend {
+class {{config.class_export.macro}} Backend {
public:
{% for command in domain.commands %}
{% if "redirect" in command %}{% continue %}{% endif %}
{% if ("handlers" in command) and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
{% if "async" in command %}
- class {{export_macro}} {{command.name | to_title_case}}Callback : public BackendCallback {
+ class {{config.class_export.macro}} {{command.name | to_title_case}}Callback : public BackendCallback {
public:
virtual void sendSuccess(
{%- for parameter in command.returns -%}
@@ -237,7 +237,7 @@ protected:
// ------------- Frontend interface.
-class {{export_macro}} Frontend {
+class {{config.class_export.macro}} Frontend {
public:
Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
{% for event in domain.events %}
@@ -260,7 +260,7 @@ private:
// ------------- Dispatcher.
-class {{export_macro}} Dispatcher {
+class {{config.class_export.macro}} Dispatcher {
public:
static void wire(UberDispatcher*, blink::protocol::{{domain.domain}}::Backend*);
@@ -270,7 +270,7 @@ private:
// ------------- Metainfo.
-class {{export_macro}} Metainfo {
+class {{config.class_export.macro}} Metainfo {
public:
using BackendClass = Backend;
using FrontendClass = Frontend;

Powered by Google App Engine
This is Rietveld 408576698