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() {} |