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

Unified Diff: third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template

Issue 2008183002: DevTools: generate frontend and backend interfaces under domains. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed Created 4 years, 7 months 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/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
index e2c87915db49f48302cc65f5483e440f387e46f0..f32601f6e17c8ad6df7fd964b2372a5e09e01e67 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/Frontend_cpp.template
@@ -18,11 +18,16 @@ Frontend::Frontend(FrontendChannel* frontendChannel)
{% endfor %}
{
}
-
{% for domain in api.domains %}
+
+{{domain.domain}}::Frontend* {{domain.domain}}::Frontend::from(protocol::Frontend* frontend)
+{
+ return &(frontend->m_{{domain.domain | lower}});
+}
{% for event in domain.events %}
{% if "handlers" in event and not ("renderer" in event["handlers"]) %}{% continue %}{% endif %}
-void Frontend::{{domain.domain}}::{{event.name}}(
+
+void {{domain.domain}}::Frontend::{{event.name}}(
{%- for parameter in event.parameters %}
{% if "optional" in parameter -%}
const Maybe<{{resolve_type(parameter).raw_type}}>&

Powered by Google App Engine
This is Rietveld 408576698