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

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: rebase 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..461468a6e089a1b33c9bdb2771d57add9af48aa0 100644
--- a/content/browser/devtools/protocol/devtools_protocol_client.h
+++ b/content/browser/devtools/protocol/devtools_protocol_client.h
@@ -17,6 +17,9 @@ class DevToolsProtocolClient {
typedef base::Callback<void(scoped_refptr<DevToolsProtocol::Response>)>
ResponseCallback;
+ typedef base::Callback<void(const std::string& message)>
+ RawMessageCallback;
+
enum ResponseStatus {
RESPONSE_STATUS_FALLTHROUGH,
RESPONSE_STATUS_OK,
@@ -53,9 +56,14 @@ 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);
+ const ResponseCallback& response_callback,
+ const RawMessageCallback& raw_message_callback);
caseq 2014/10/13 13:01:27 Let's have one callback instead of three, i.e. jus
dgozman 2014/10/14 12:42:22 Done.
virtual ~DevToolsProtocolClient();
@@ -67,6 +75,7 @@ class DevToolsProtocolClient {
private:
EventCallback event_callback_;
ResponseCallback response_callback_;
+ RawMessageCallback raw_message_callback_;
DISALLOW_COPY_AND_ASSIGN(DevToolsProtocolClient);
};

Powered by Google App Engine
This is Rietveld 408576698