summaryrefslogtreecommitdiffstats
path: root/chrome/browser/devtools/adb_client_socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/devtools/adb_client_socket.h')
-rw-r--r--chrome/browser/devtools/adb_client_socket.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/chrome/browser/devtools/adb_client_socket.h b/chrome/browser/devtools/adb_client_socket.h
index f5e7872..f93a1af 100644
--- a/chrome/browser/devtools/adb_client_socket.h
+++ b/chrome/browser/devtools/adb_client_socket.h
@@ -31,10 +31,35 @@ class AdbClientSocket {
const std::string& request,
const SocketCallback& callback);
- private:
- AdbClientSocket();
+ AdbClientSocket(const std::string& host, int port);
~AdbClientSocket();
+ protected:
+ void Connect(const net::CompletionCallback& callback);
+
+ void SendCommand(const std::string& command,
+ bool is_void,
+ const CommandCallback& callback);
+
+ scoped_ptr<net::TCPClientSocket> socket_;
+
+ private:
+ void ReadResponse(const CommandCallback& callback, bool is_void, int result);
+
+ void OnResponseHeader(const CommandCallback& callback,
+ bool is_void,
+ scoped_refptr<net::IOBuffer> response_buffer,
+ int result);
+
+ void OnResponseData(const CommandCallback& callback,
+ const std::string& response,
+ scoped_refptr<net::IOBuffer> response_buffer,
+ int bytes_left,
+ int result);
+
+ std::string host_;
+ int port_;
+
DISALLOW_COPY_AND_ASSIGN(AdbClientSocket);
};