| Index: third_party/WebKit/Source/platform/inspector_protocol/Backend_h.template
|
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Backend_h.template b/third_party/WebKit/Source/platform/inspector_protocol/Backend_h.template
|
| index 4d6ac711f6dfaca489d57fb9a29cd3b848144292..c1f3cb69c50a2fb56fb8fa83fe1082ee8c05b9d0 100644
|
| --- a/third_party/WebKit/Source/platform/inspector_protocol/Backend_h.template
|
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/Backend_h.template
|
| @@ -7,71 +7,67 @@
|
| #ifndef {{class_name}}_h
|
| #define {{class_name}}_h
|
|
|
| +#include "platform/inspector_protocol/BackendCallback.h"
|
| +#include "platform/inspector_protocol/ErrorSupport.h"
|
| #include "platform/inspector_protocol/TypeBuilder.h"
|
|
|
| namespace blink {
|
| namespace protocol {
|
|
|
| -class FrontendChannel;
|
| -class BackendImplWeakPtr;
|
| +{% for domain in api.domains %}
|
| +
|
| +namespace {{domain.domain}} {
|
|
|
| class PLATFORM_EXPORT Backend {
|
| public:
|
| - class PLATFORM_EXPORT CallbackBase {
|
| - public:
|
| - virtual ~CallbackBase() { }
|
| - virtual void sendFailure(const ErrorString&) = 0;
|
| - };
|
| -{% for domain in api.domains %}
|
| -
|
| - class PLATFORM_EXPORT {{domain.domain}} {
|
| - 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 PLATFORM_EXPORT {{command.name | to_title_case}}Callback : public CallbackBase {
|
| - public:
|
| - virtual void sendSuccess(
|
| + class PLATFORM_EXPORT {{command.name | to_title_case}}Callback : public BackendCallback {
|
| + public:
|
| + virtual void sendSuccess(
|
| {%- for parameter in command.returns -%}
|
| {%- if "optional" in parameter -%}
|
| - const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
|
| + const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
|
| {%- else -%}
|
| {{resolve_type(parameter).pass_type}} {{parameter.name}}
|
| {%- endif -%}
|
| {%- if not loop.last -%}, {% endif -%}
|
| {%- endfor -%}
|
| - ) = 0;
|
| - };
|
| + ) = 0;
|
| + };
|
| {% endif %}
|
| - virtual void {{command.name}}(ErrorString*
|
| + virtual void {{command.name}}(ErrorString*
|
| {%- for parameter in command.parameters -%}
|
| {%- if "optional" in parameter -%}
|
| - , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter.name}}
|
| + , const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter.name}}
|
| {%- else -%}
|
| - , {{resolve_type(parameter).pass_type}} in_{{parameter.name}}
|
| + , {{resolve_type(parameter).pass_type}} in_{{parameter.name}}
|
| {%- endif -%}
|
| {%- endfor -%}
|
| {%- if "async" in command -%}
|
| - , std::unique_ptr<{{command.name | to_title_case}}Callback> callback
|
| + , std::unique_ptr<{{command.name | to_title_case}}Callback> callback
|
| {%- else -%}
|
| {%- for parameter in command.returns -%}
|
| {%- if "optional" in parameter -%}
|
| - , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name}}
|
| + , Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name}}
|
| {%- else -%}
|
| - , {{resolve_type(parameter).type}}* out_{{parameter.name}}
|
| + , {{resolve_type(parameter).type}}* out_{{parameter.name}}
|
| {%- endif -%}
|
| {%- endfor -%}
|
| {%- endif -%}
|
| - ) = 0;
|
| + ) = 0;
|
| {% endfor %}
|
|
|
| - protected:
|
| - virtual ~{{domain.domain}}() { }
|
| - };
|
| -{% endfor %}
|
| +protected:
|
| + virtual ~Backend() { }
|
| };
|
|
|
| +} // namespace {{domain.domain}}
|
| +
|
| +{% endfor %}
|
| +
|
| } // namespace protocol
|
| } // namespace blink
|
|
|
|
|