| Index: third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template b/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template
|
| index e0d782d6ec0c78cd654b5588322af126f09ae0f5..b72cdf22094973580b2ed07346d29d7c8100130e 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/templates/TypeBuilder_h.template
|
| @@ -7,7 +7,9 @@
|
| #ifndef {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h
|
| #define {{"_".join(config.protocol.namespace)}}_{{domain.domain}}_h
|
|
|
| -#include "{{config.class_export.header}}"
|
| +{% if config.protocol.export_header %}
|
| +#include {{format_include(config.protocol.export_header)}}
|
| +{% endif %}
|
| #include "{{config.protocol.package}}/Protocol.h"
|
| // For each imported domain we generate a ValueConversions struct instead of a full domain definition
|
| // and include Domain::API version from there.
|
| @@ -43,7 +45,7 @@ using {{type.id}} = {{resolve_type(type).type}};
|
|
|
| namespace {{type.id}}Enum {
|
| {% for literal in type.enum %}
|
| -{{config.class_export.macro}} extern const char* {{ literal | dash_to_camelcase}};
|
| +{{config.protocol.export_macro}} extern const char* {{ literal | dash_to_camelcase}};
|
| {% endfor %}
|
| } // namespace {{type.id}}Enum
|
| {% endif %}
|
| @@ -55,7 +57,7 @@ namespace {{type.id}}Enum {
|
| namespace {{command.name | to_title_case}} {
|
| namespace {{param.name | to_title_case}}Enum {
|
| {% for literal in param.enum %}
|
| -{{config.class_export.macro}} extern const char* {{literal | dash_to_camelcase}};
|
| +{{config.protocol.export_macro}} extern const char* {{literal | dash_to_camelcase}};
|
| {% endfor %}
|
| } // {{param.name | to_title_case}}Enum
|
| } // {{command.name | to_title_case }}
|
| @@ -69,7 +71,7 @@ namespace {{param.name | to_title_case}}Enum {
|
| {% set type_def = type_definition(domain.domain + "." + type.id)%}
|
|
|
| // {{type.description}}
|
| -class {{config.class_export.macro}} {{type.id}} {% if type.exported %}: public API::{{type.id}} {% endif %}{
|
| +class {{config.protocol.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);
|
| @@ -78,7 +80,7 @@ public:
|
| {% for property in type.properties %}
|
| {% if "enum" in property %}
|
|
|
| - struct {{config.class_export.macro}} {{property.name | to_title_case}}Enum {
|
| + struct {{config.protocol.export_macro}} {{property.name | to_title_case}}Enum {
|
| {% for literal in property.enum %}
|
| static const char* {{literal | dash_to_camelcase}};
|
| {% endfor %}
|
| @@ -181,13 +183,13 @@ private:
|
|
|
| // ------------- Backend interface.
|
|
|
| -class {{config.class_export.macro}} Backend {
|
| +class {{config.protocol.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 {{config.class_export.macro}} {{command.name | to_title_case}}Callback : public BackendCallback {
|
| + class {{config.protocol.export_macro}} {{command.name | to_title_case}}Callback : public BackendCallback {
|
| public:
|
| virtual void sendSuccess(
|
| {%- for parameter in command.returns -%}
|
| @@ -238,7 +240,7 @@ protected:
|
|
|
| // ------------- Frontend interface.
|
|
|
| -class {{config.class_export.macro}} Frontend {
|
| +class {{config.protocol.export_macro}} Frontend {
|
| public:
|
| Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
|
| {% for event in domain.events %}
|
| @@ -261,7 +263,7 @@ private:
|
|
|
| // ------------- Dispatcher.
|
|
|
| -class {{config.class_export.macro}} Dispatcher {
|
| +class {{config.protocol.export_macro}} Dispatcher {
|
| public:
|
| static void wire(UberDispatcher*, Backend*);
|
|
|
| @@ -271,7 +273,7 @@ private:
|
|
|
| // ------------- Metainfo.
|
|
|
| -class {{config.class_export.macro}} Metainfo {
|
| +class {{config.protocol.export_macro}} Metainfo {
|
| public:
|
| using BackendClass = Backend;
|
| using FrontendClass = Frontend;
|
|
|