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

Unified Diff: third_party/inspector_protocol/templates/TypeBuilder_h.template

Issue 2478853002: Roll third_party/inspector_protocol to ebda02bf94a742a2e26e4f818df1fc77517ac44c (Closed)
Patch Set: 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
« no previous file with comments | « third_party/inspector_protocol/templates/TypeBuilder_cpp.template ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/inspector_protocol/templates/TypeBuilder_h.template
diff --git a/third_party/inspector_protocol/templates/TypeBuilder_h.template b/third_party/inspector_protocol/templates/TypeBuilder_h.template
index 802a16fd657aa7de273a13ac44fa7f9fe5886cd5..f665039dd7da19ea76c68b595b2929ff8f33cbe4 100644
--- a/third_party/inspector_protocol/templates/TypeBuilder_h.template
+++ b/third_party/inspector_protocol/templates/TypeBuilder_h.template
@@ -196,40 +196,26 @@ public:
virtual void sendSuccess(
{%- for parameter in command.returns -%}
{%- if "optional" in parameter -%}
- {%- if new_style(domain) -%}
Maybe<{{resolve_type(parameter).raw_type}}> {{parameter.name}}
- {%- else -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}}
- {%- endif -%}
{%- else -%}
{{resolve_type(parameter).pass_type}} {{parameter.name}}
{%- endif -%}
{%- if not loop.last -%}, {% endif -%}
{%- endfor -%}
) = 0;
- {% if new_style(domain) %}
virtual void sendFailure(const DispatchResponse&) = 0;
- {% else %}
- virtual void sendFailure(const ErrorString&) = 0;
- {% endif %}
+ virtual ~{{command.name | to_title_case}}Callback() { }
};
{% endif %}
- {%- if not("async" in command) and new_style(domain) %}
+ {%- if not("async" in command) %}
virtual DispatchResponse {{command.name}}(
{%- else %}
virtual void {{command.name}}(
{%- endif %}
- {%- if not("async" in command) and not new_style(domain) -%}
- ErrorString*
- {%- endif -%}
{%- for parameter in command.parameters -%}
- {%- if (not loop.first) or (not ("async" in command) and not new_style(domain)) -%}, {% endif -%}
+ {%- if not loop.first -%}, {% endif -%}
{%- if "optional" in parameter -%}
- {%- if new_style(domain) -%}
Maybe<{{resolve_type(parameter).raw_type}}> in_{{parameter.name}}
- {%- else -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>& in_{{parameter.name}}
- {%- endif -%}
{%- else -%}
{{resolve_type(parameter).pass_type}} in_{{parameter.name}}
{%- endif -%}
@@ -239,7 +225,7 @@ public:
std::unique_ptr<{{command.name | to_title_case}}Callback> callback
{%- else -%}
{%- for parameter in command.returns -%}
- {%- if (not loop.first) or command.parameters or not new_style(domain) -%}, {% endif -%}
+ {%- if (not loop.first) or command.parameters -%}, {% endif -%}
{%- if "optional" in parameter -%}
Maybe<{{resolve_type(parameter).raw_type}}>* out_{{parameter.name}}
{%- else -%}
@@ -251,26 +237,11 @@ public:
{% endfor %}
{% if not has_disable(domain.commands) %}
- {% if new_style(domain) %}
virtual DispatchResponse disable()
{
return DispatchResponse::OK();
}
- {% else %}
- virtual void disable(ErrorString*) { }
- {% endif %}
{% endif %}
-
- // TODO(dgozman): remove once all domains migrated.
- static void disableMe(Backend* backend)
- {
- {% if new_style(domain) %}
- backend->disable();
- {% else %}
- ErrorString error;
- backend->disable(&error);
- {% endif %}
- }
};
// ------------- Frontend interface.
@@ -283,11 +254,7 @@ public:
void {{event.name}}(
{%- for parameter in event.parameters -%}
{%- if "optional" in parameter -%}
- {%- if new_style(domain) -%}
Maybe<{{resolve_type(parameter).raw_type}}> {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
- {%- else -%}
- const Maybe<{{resolve_type(parameter).raw_type}}>& {{parameter.name}} = Maybe<{{resolve_type(parameter).raw_type}}>()
- {%- endif -%}
{%- else -%}
{{resolve_type(parameter).pass_type}} {{parameter.name}}
{%- endif -%}{%- if not loop.last -%}, {% endif -%}
« no previous file with comments | « third_party/inspector_protocol/templates/TypeBuilder_cpp.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698