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

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

Issue 2025953002: DevTools: generate class-per domain for remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/TypeBuilder_cpp.template
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
index 88e5c9735c99cbea5e80b39279e2735e0c34a926..1aeef458f8d4bafaddc73094808112a73eb5b5c0 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/TypeBuilder_cpp.template
@@ -4,19 +4,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "platform/inspector_protocol/{{class_name}}.h"
+#include "{{output_package}}/{{domain.domain}}.h"
#include "platform/inspector_protocol/DispatcherBase.h"
namespace blink {
namespace protocol {
-
-static const char kInvalidRequest[] = "Invalid request";
+namespace {{domain.domain}} {
// ------------- Enum values from types.
-{% for domain in api.domains %}
-
-namespace {{domain.domain}} {
const char Metainfo::domainName[] = "{{domain.domain}}";
{% for type in domain.types %}
@@ -181,7 +177,7 @@ void DispatcherImpl::dispatch(int callId, const String16& method, std::unique_pt
{% if "handlers" in command and not ("renderer" in command["handlers"]) %}{% continue %}{% endif %}
{% if "async" in command %}
-class PLATFORM_EXPORT {{command.name | to_title_case}}CallbackImpl : public Backend::{{command.name | to_title_case}}Callback, public DispatcherBase::Callback {
+class {{command.name | to_title_case}}CallbackImpl : public Backend::{{command.name | to_title_case}}Callback, public DispatcherBase::Callback {
public:
{{command.name | to_title_case}}CallbackImpl(std::unique_ptr<DispatcherBase::WeakPtr> backendImpl, int callId)
: DispatcherBase::Callback(std::move(backendImpl), callId) { }
@@ -300,7 +296,5 @@ void Dispatcher::wire(UberDispatcher* dispatcher, Backend* backend)
}
} // {{domain.domain}}
-{% endfor %}
-
} // namespace protocol
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698