| 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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 int GetPeerAddress(net::IPEndPoint* address) const override; | 45 int GetPeerAddress(net::IPEndPoint* address) const override; |
| 46 int GetLocalAddress(net::IPEndPoint* address) const override; | 46 int GetLocalAddress(net::IPEndPoint* address) const override; |
| 47 const net::BoundNetLog& NetLog() const override; | 47 const net::BoundNetLog& NetLog() const override; |
| 48 void SetSubresourceSpeculation() override; | 48 void SetSubresourceSpeculation() override; |
| 49 void SetOmniboxSpeculation() override; | 49 void SetOmniboxSpeculation() override; |
| 50 bool WasEverUsed() const override; | 50 bool WasEverUsed() const override; |
| 51 bool UsingTCPFastOpen() const override; | 51 bool UsingTCPFastOpen() const override; |
| 52 bool WasNpnNegotiated() const override; | 52 bool WasNpnNegotiated() const override; |
| 53 net::NextProto GetNegotiatedProtocol() const override; | 53 net::NextProto GetNegotiatedProtocol() const override; |
| 54 bool GetSSLInfo(net::SSLInfo* ssl_info) override; | 54 bool GetSSLInfo(net::SSLInfo* ssl_info) override; |
| 55 void GetConnectionAttempts(ConnectionAttempts* out) const override; |
| 56 void ClearConnectionAttempts() override {} |
| 57 void AddConnectionAttempts(const ConnectionAttempts& attempts) override {} |
| 55 | 58 |
| 56 private: | 59 private: |
| 57 void RespondToReader(bool disconnect); | 60 void RespondToReader(bool disconnect); |
| 58 void RespondToWriter(int result); | 61 void RespondToWriter(int result); |
| 59 | 62 |
| 60 scoped_refptr<AndroidUsbDevice> device_; | 63 scoped_refptr<AndroidUsbDevice> device_; |
| 61 std::string command_; | 64 std::string command_; |
| 62 uint32 local_id_; | 65 uint32 local_id_; |
| 63 uint32 remote_id_; | 66 uint32 remote_id_; |
| 64 net::BoundNetLog net_log_; | 67 net::BoundNetLog net_log_; |
| 65 bool is_connected_; | 68 bool is_connected_; |
| 66 std::string read_buffer_; | 69 std::string read_buffer_; |
| 67 scoped_refptr<net::IOBuffer> read_io_buffer_; | 70 scoped_refptr<net::IOBuffer> read_io_buffer_; |
| 68 int read_length_; | 71 int read_length_; |
| 69 int write_length_; | 72 int write_length_; |
| 70 net::CompletionCallback connect_callback_; | 73 net::CompletionCallback connect_callback_; |
| 71 net::CompletionCallback read_callback_; | 74 net::CompletionCallback read_callback_; |
| 72 net::CompletionCallback write_callback_; | 75 net::CompletionCallback write_callback_; |
| 73 base::Closure delete_callback_; | 76 base::Closure delete_callback_; |
| 74 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; | 77 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; |
| 75 | 78 |
| 76 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); | 79 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); |
| 77 }; | 80 }; |
| 78 | 81 |
| 79 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 82 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
| OLD | NEW |