| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
| 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const std::string& command, | 28 const std::string& command, |
| 29 base::Callback<void(uint32)> delete_callback); | 29 base::Callback<void(uint32)> delete_callback); |
| 30 virtual ~AndroidUsbSocket(); | 30 virtual ~AndroidUsbSocket(); |
| 31 | 31 |
| 32 void HandleIncoming(scoped_refptr<AdbMessage> message); | 32 void HandleIncoming(scoped_refptr<AdbMessage> message); |
| 33 | 33 |
| 34 void Terminated(bool closed_by_device); | 34 void Terminated(bool closed_by_device); |
| 35 | 35 |
| 36 // net::StreamSocket implementation. | 36 // net::StreamSocket implementation. |
| 37 virtual int Read(net::IOBuffer* buf, int buf_len, | 37 virtual int Read(net::IOBuffer* buf, int buf_len, |
| 38 const net::CompletionCallback& callback) OVERRIDE; | 38 const net::CompletionCallback& callback) override; |
| 39 virtual int Write(net::IOBuffer* buf, int buf_len, | 39 virtual int Write(net::IOBuffer* buf, int buf_len, |
| 40 const net::CompletionCallback& callback) OVERRIDE; | 40 const net::CompletionCallback& callback) override; |
| 41 virtual int SetReceiveBufferSize(int32 size) OVERRIDE; | 41 virtual int SetReceiveBufferSize(int32 size) override; |
| 42 virtual int SetSendBufferSize(int32 size) OVERRIDE; | 42 virtual int SetSendBufferSize(int32 size) override; |
| 43 virtual int Connect(const net::CompletionCallback& callback) OVERRIDE; | 43 virtual int Connect(const net::CompletionCallback& callback) override; |
| 44 virtual void Disconnect() OVERRIDE; | 44 virtual void Disconnect() override; |
| 45 virtual bool IsConnected() const OVERRIDE; | 45 virtual bool IsConnected() const override; |
| 46 virtual bool IsConnectedAndIdle() const OVERRIDE; | 46 virtual bool IsConnectedAndIdle() const override; |
| 47 virtual int GetPeerAddress(net::IPEndPoint* address) const OVERRIDE; | 47 virtual int GetPeerAddress(net::IPEndPoint* address) const override; |
| 48 virtual int GetLocalAddress(net::IPEndPoint* address) const OVERRIDE; | 48 virtual int GetLocalAddress(net::IPEndPoint* address) const override; |
| 49 virtual const net::BoundNetLog& NetLog() const OVERRIDE; | 49 virtual const net::BoundNetLog& NetLog() const override; |
| 50 virtual void SetSubresourceSpeculation() OVERRIDE; | 50 virtual void SetSubresourceSpeculation() override; |
| 51 virtual void SetOmniboxSpeculation() OVERRIDE; | 51 virtual void SetOmniboxSpeculation() override; |
| 52 virtual bool WasEverUsed() const OVERRIDE; | 52 virtual bool WasEverUsed() const override; |
| 53 virtual bool UsingTCPFastOpen() const OVERRIDE; | 53 virtual bool UsingTCPFastOpen() const override; |
| 54 virtual bool WasNpnNegotiated() const OVERRIDE; | 54 virtual bool WasNpnNegotiated() const override; |
| 55 virtual net::NextProto GetNegotiatedProtocol() const OVERRIDE; | 55 virtual net::NextProto GetNegotiatedProtocol() const override; |
| 56 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) OVERRIDE; | 56 virtual bool GetSSLInfo(net::SSLInfo* ssl_info) override; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 class IORequest { | 59 class IORequest { |
| 60 public: | 60 public: |
| 61 IORequest(net::IOBuffer* buffer, | 61 IORequest(net::IOBuffer* buffer, |
| 62 int length, | 62 int length, |
| 63 const net::CompletionCallback& callback); | 63 const net::CompletionCallback& callback); |
| 64 ~IORequest(); | 64 ~IORequest(); |
| 65 | 65 |
| 66 scoped_refptr<net::IOBuffer> buffer; | 66 scoped_refptr<net::IOBuffer> buffer; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 80 bool is_connected_; | 80 bool is_connected_; |
| 81 std::string read_buffer_; | 81 std::string read_buffer_; |
| 82 net::CompletionCallback connect_callback_; | 82 net::CompletionCallback connect_callback_; |
| 83 std::deque<IORequest> read_requests_; | 83 std::deque<IORequest> read_requests_; |
| 84 std::deque<IORequest> write_requests_; | 84 std::deque<IORequest> write_requests_; |
| 85 | 85 |
| 86 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); | 86 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); |
| 87 }; | 87 }; |
| 88 | 88 |
| 89 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 89 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
| OLD | NEW |