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

Unified Diff: templates/TypeBuilder_cpp.template

Issue 2495353004: [inspector_protocol] Support chromium code style. (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 | « templates/Imported_h.template ('k') | templates/TypeBuilder_h.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: templates/TypeBuilder_cpp.template
diff --git a/templates/TypeBuilder_cpp.template b/templates/TypeBuilder_cpp.template
index 11fd5995e027d78cd17ed2441dbd139461d573f1..394d0ccaf64b57024bbb9a71fc431b5cea1a778a 100644
--- a/templates/TypeBuilder_cpp.template
+++ b/templates/TypeBuilder_cpp.template
@@ -4,9 +4,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "{{config.protocol.package}}/{{domain.domain}}.h"
+#include {{format_include(config.protocol.package, domain.domain)}}
-#include "{{config.protocol.package}}/Protocol.h"
+#include {{format_include(config.protocol.package, "Protocol")}}
{% for namespace in config.protocol.namespace %}
namespace {{namespace}} {
@@ -147,7 +147,7 @@ const char* {{ literal | to_title_case}} = "{{literal}}";
{% for event in domain.events %}
{% if not generate_event(domain.domain, event.name) %}{% continue %}{% endif %}
-void Frontend::{{event.name}}(
+void Frontend::{{event.name | to_method_case}}(
{%- for parameter in event.parameters %}
{% if "optional" in parameter -%}
Maybe<{{resolve_type(parameter).raw_type}}>
@@ -298,7 +298,7 @@ DispatchResponse::Status DispatcherImpl::{{command.name}}(int callId, std::uniqu
{% if not is_async_command(domain.domain, command.name) %}
std::unique_ptr<DispatcherBase::WeakPtr> weak = weakPtr();
- DispatchResponse response = m_backend->{{command.name}}(
+ DispatchResponse response = m_backend->{{command.name | to_method_case}}(
{%- for property in command.parameters -%}
{%- if not loop.first -%}, {% endif -%}
{%- if "optional" in property -%}
@@ -336,7 +336,7 @@ DispatchResponse::Status DispatcherImpl::{{command.name}}(int callId, std::uniqu
return response.status();
{% else %}
std::unique_ptr<{{command.name | to_title_case}}CallbackImpl> callback(new {{command.name | to_title_case}}CallbackImpl(weakPtr(), callId));
- m_backend->{{command.name}}(
+ m_backend->{{command.name | to_method_case}}(
{%- for property in command.parameters -%}
{%- if not loop.first -%}, {% endif -%}
{%- if "optional" in property -%}
« no previous file with comments | « templates/Imported_h.template ('k') | templates/TypeBuilder_h.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698