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

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

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/DispatcherBase_h.template
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/DispatcherBase_h.template b/third_party/WebKit/Source/platform/inspector_protocol/DispatcherBase_h.template
index 4402d9674ab24651f3a6e005f26b60798765df68..0d4b03b6c20977a09939acd23759921fa5788ead 100644
--- a/third_party/WebKit/Source/platform/inspector_protocol/DispatcherBase_h.template
+++ b/third_party/WebKit/Source/platform/inspector_protocol/DispatcherBase_h.template
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef DispatcherBase_h
-#define DispatcherBase_h
+#ifndef {{"_".join(config.protocol.namespace)}}_DispatcherBase_h
+#define {{"_".join(config.protocol.namespace)}}_DispatcherBase_h
//#include "BackendCallback.h"
//#include "Collections.h"
//#include "ErrorSupport.h"
+//#include "FrontendChannel.h"
//#include "Platform.h"
-//#include "String16.h"
+//#include "String.h"
//#include "Values.h"
-#include "{{config.class_export.header}}"
-namespace blink {
-namespace protocol {
+{% for namespace in config.protocol.namespace %}
+namespace {{namespace}} {
+{% endfor %}
-class FrontendChannel;
class WeakPtr;
class {{config.class_export.macro}} DispatcherBase {
@@ -60,15 +60,15 @@ public:
ServerError = -32000,
};
- static bool getCommandName(const String16& message, String16* result);
+ static bool getCommandName(const String& message, String* result);
- virtual void dispatch(int callId, const String16& method, std::unique_ptr<protocol::DictionaryValue> messageObject) = 0;
+ virtual void dispatch(int callId, const String& method, std::unique_ptr<protocol::DictionaryValue> messageObject) = 0;
void sendResponse(int callId, const ErrorString&, ErrorSupport*, std::unique_ptr<protocol::DictionaryValue> result);
void sendResponse(int callId, const ErrorString&, std::unique_ptr<protocol::DictionaryValue> result);
void sendResponse(int callId, const ErrorString&);
- void reportProtocolError(int callId, CommonErrorCode, const String16& errorMessage, ErrorSupport* errors);
+ void reportProtocolError(int callId, CommonErrorCode, const String& errorMessage, ErrorSupport* errors);
void clearFrontend();
std::unique_ptr<WeakPtr> weakPtr();
@@ -82,17 +82,18 @@ class {{config.class_export.macro}} UberDispatcher {
PROTOCOL_DISALLOW_COPY(UberDispatcher);
public:
explicit UberDispatcher(FrontendChannel*);
- void registerBackend(const String16& name, std::unique_ptr<protocol::DispatcherBase>);
- void dispatch(const String16& message);
+ void registerBackend(const String& name, std::unique_ptr<protocol::DispatcherBase>);
+ void dispatch(const String& message);
FrontendChannel* channel() { return m_frontendChannel; }
virtual ~UberDispatcher();
private:
FrontendChannel* m_frontendChannel;
- protocol::HashMap<String16, std::unique_ptr<protocol::DispatcherBase>> m_dispatchers;
+ protocol::HashMap<String, std::unique_ptr<protocol::DispatcherBase>> m_dispatchers;
};
-} // namespace platform
-} // namespace blink
+{% for namespace in config.protocol.namespace %}
+} // namespace {{namespace}}
+{% endfor %}
-#endif // !defined(DispatcherBase_h)
+#endif // !defined({{"_".join(config.protocol.namespace)}}_DispatcherBase_h)

Powered by Google App Engine
This is Rietveld 408576698