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

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

Issue 2475663004: [DevTools] Roll third_party/inspector_protocol to 3c6f5ff8ab6653b47cf226233d488701a527d761. (Closed)
Patch Set: roll 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 1d5a57bdc308923774d0f34d34a635f8f60d5712..246d455a6477ad078d4ed90bc01d76c8c1b9b069 100644
--- a/third_party/inspector_protocol/templates/TypeBuilder_h.template
+++ b/third_party/inspector_protocol/templates/TypeBuilder_h.template
@@ -189,8 +189,8 @@ 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 %}
+ {% if not generate_command(domain.domain, command.name) %}{% continue %}{% endif %}
+ {% if is_async_command(domain.domain, command.name) %}
class {{config.protocol.export_macro}} {{command.name | to_title_case}}Callback {
public:
virtual void sendSuccess(
@@ -204,9 +204,10 @@ public:
{%- endfor -%}
) = 0;
virtual void sendFailure(const DispatchResponse&) = 0;
+ virtual ~{{command.name | to_title_case}}Callback() { }
};
{% endif %}
- {%- if not("async" in command) %}
+ {%- if not is_async_command(domain.domain, command.name) %}
virtual DispatchResponse {{command.name}}(
{%- else %}
virtual void {{command.name}}(
@@ -219,7 +220,7 @@ public:
{{resolve_type(parameter).pass_type}} in_{{parameter.name}}
{%- endif -%}
{%- endfor -%}
- {%- if "async" in command -%}
+ {%- if is_async_command(domain.domain, command.name) -%}
{%- if command.parameters -%}, {% endif -%}
std::unique_ptr<{{command.name | to_title_case}}Callback> callback
{%- else -%}
@@ -235,7 +236,7 @@ public:
) = 0;
{% endfor %}
- {% if not has_disable(domain.commands) %}
+ {% if generate_disable(domain) %}
virtual DispatchResponse disable()
{
return DispatchResponse::OK();
@@ -249,7 +250,7 @@ class {{config.protocol.export_macro}} Frontend {
public:
Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
{% for event in domain.events %}
- {% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
+ {% if not generate_event(domain.domain, event.name) %}{% continue %}{% endif %}
void {{event.name}}(
{%- for parameter in event.parameters -%}
{%- if "optional" in parameter -%}
« 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