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

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

Issue 2475663004: [DevTools] Roll third_party/inspector_protocol to 3c6f5ff8ab6653b47cf226233d488701a527d761. (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
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..fb90d39bdd4f8f5e6f13974b880ae20869f02024 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(
@@ -206,7 +206,7 @@ public:
virtual void sendFailure(const DispatchResponse&) = 0;
};
{% 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 +219,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 +235,7 @@ public:
) = 0;
{% endfor %}
- {% if not has_disable(domain.commands) %}
+ {% if generate_disable(domain) %}
virtual DispatchResponse disable()
{
return DispatchResponse::OK();
@@ -249,7 +249,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 -%}

Powered by Google App Engine
This is Rietveld 408576698