summaryrefslogtreecommitdiffstats
path: root/chrome/browser/devtools/devtools_protocol.h
diff options
context:
space:
mode:
authorkaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-12 11:40:00 +0000
committerkaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-12 11:40:00 +0000
commit8ef81a7eca137573c1eb3cc9b7e57397fcd00273 (patch)
treeaa1236078f8caf89a49b663d55dc4f83af90585a /chrome/browser/devtools/devtools_protocol.h
parent9a298343694588aa13efd013c399c057ca16c6e1 (diff)
downloadchromium_src-8ef81a7eca137573c1eb3cc9b7e57397fcd00273.zip
chromium_src-8ef81a7eca137573c1eb3cc9b7e57397fcd00273.tar.gz
chromium_src-8ef81a7eca137573c1eb3cc9b7e57397fcd00273.tar.bz2
Visualize status of port forwarding sockets in chrome:inspect Devices tab
BUG=270046 R=pfeldman@chromium.org Review URL: https://codereview.chromium.org/22685003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/devtools/devtools_protocol.h')
-rw-r--r--chrome/browser/devtools/devtools_protocol.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/chrome/browser/devtools/devtools_protocol.h b/chrome/browser/devtools/devtools_protocol.h
index 9a01eee..9b15b9e 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() {}