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

Unified Diff: chrome/browser/devtools/devtools_protocol.h

Issue 22685003: Visualize status of port forwarding sockets in chrome:inspect Devices tab (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
« no previous file with comments | « chrome/browser/devtools/devtools_adb_bridge.h ('k') | chrome/browser/devtools/devtools_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_protocol.h
diff --git a/chrome/browser/devtools/devtools_protocol.h b/chrome/browser/devtools/devtools_protocol.h
index 9a01eee531373b65e21b95d311a9e20905a2a55a..9b15b9e3ac445939199b0a9b02483bcd7e1cde8b 100644
--- a/chrome/browser/devtools/devtools_protocol.h
+++ b/chrome/browser/devtools/devtools_protocol.h
@@ -38,7 +38,7 @@ class DevToolsProtocol {
public:
// Takes ownership of |params|.
Command(int id, const std::string& method, base::DictionaryValue* params);
- virtual ~Command();
+ virtual ~Command();
int id() { return id_; }
std::string Serialize();
@@ -49,6 +49,23 @@ class DevToolsProtocol {
DISALLOW_COPY_AND_ASSIGN(Command);
};
+ class Response {
+ public:
+ virtual ~Response();
+
+ int id() { return id_; }
+ int error_code() { return error_code_; }
+
+ private:
+ friend class DevToolsProtocol;
+
+ Response(int id, int error_code);
+ int id_;
+ int error_code_;
+
+ DISALLOW_COPY_AND_ASSIGN(Response);
+ };
+
class Notification : public Message {
public:
virtual ~Notification();
@@ -63,8 +80,12 @@ class DevToolsProtocol {
DISALLOW_COPY_AND_ASSIGN(Notification);
};
+ // Result ownership is passed to the caller.
static Notification* ParseNotification(const std::string& json);
+ // Result ownership is passed to the caller.
+ static Response* ParseResponse(const std::string& json);
+
private:
DevToolsProtocol() {}
« no previous file with comments | « chrome/browser/devtools/devtools_adb_bridge.h ('k') | chrome/browser/devtools/devtools_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698