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

Unified Diff: content/browser/devtools/protocol/devtools_protocol_client.h

Issue 635733003: [DevTools] Migrate DevToolsTracingHandler to generated handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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: content/browser/devtools/protocol/devtools_protocol_client.h
diff --git a/content/browser/devtools/protocol/devtools_protocol_client.h b/content/browser/devtools/protocol/devtools_protocol_client.h
index b2f95b71d3cebe14e0a66561ccc5eb30f0d98f41..620a7c14995d8265fdc4dc8492914d1241520c7c 100644
--- a/content/browser/devtools/protocol/devtools_protocol_client.h
+++ b/content/browser/devtools/protocol/devtools_protocol_client.h
@@ -11,11 +11,8 @@ namespace content {
class DevToolsProtocolClient {
public:
- typedef base::Callback<void(const std::string& event,
- base::DictionaryValue* params)> EventCallback;
-
- typedef base::Callback<void(scoped_refptr<DevToolsProtocol::Response>)>
- ResponseCallback;
+ typedef base::Callback<void(const std::string& message)>
+ RawMessageCallback;
enum ResponseStatus {
RESPONSE_STATUS_FALLTHROUGH,
@@ -53,9 +50,12 @@ class DevToolsProtocolClient {
scoped_refptr<DevToolsProtocol::Command> command,
const std::string& message);
+ // Sends message to client, the caller is presumed to properly
+ // format the message. Do not use unless you must.
+ void SendRawMessage(const std::string& message);
+
protected:
- DevToolsProtocolClient(const EventCallback& event_callback,
- const ResponseCallback& response_callback);
+ DevToolsProtocolClient(const RawMessageCallback& raw_message_callback);
virtual ~DevToolsProtocolClient();
@@ -65,8 +65,7 @@ class DevToolsProtocolClient {
void SendAsyncResponse(scoped_refptr<DevToolsProtocol::Response> response);
private:
- EventCallback event_callback_;
- ResponseCallback response_callback_;
+ RawMessageCallback raw_message_callback_;
DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolClient);
};
« no previous file with comments | « content/browser/devtools/devtools_tracing_handler.cc ('k') | content/browser/devtools/protocol/devtools_protocol_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698