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(net::ConnectionAttempts* out) const override; |
| 56 void ClearConnectionAttempts() override {} |
| 57 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { |
| 58 } |
55 | 59 |
56 private: | 60 private: |
57 void RespondToReader(bool disconnect); | 61 void RespondToReader(bool disconnect); |
58 void RespondToWriter(int result); | 62 void RespondToWriter(int result); |
59 | 63 |
60 scoped_refptr<AndroidUsbDevice> device_; | 64 scoped_refptr<AndroidUsbDevice> device_; |
61 std::string command_; | 65 std::string command_; |
62 uint32 local_id_; | 66 uint32 local_id_; |
63 uint32 remote_id_; | 67 uint32 remote_id_; |
64 net::BoundNetLog net_log_; | 68 net::BoundNetLog net_log_; |
65 bool is_connected_; | 69 bool is_connected_; |
66 std::string read_buffer_; | 70 std::string read_buffer_; |
67 scoped_refptr<net::IOBuffer> read_io_buffer_; | 71 scoped_refptr<net::IOBuffer> read_io_buffer_; |
68 int read_length_; | 72 int read_length_; |
69 int write_length_; | 73 int write_length_; |
70 net::CompletionCallback connect_callback_; | 74 net::CompletionCallback connect_callback_; |
71 net::CompletionCallback read_callback_; | 75 net::CompletionCallback read_callback_; |
72 net::CompletionCallback write_callback_; | 76 net::CompletionCallback write_callback_; |
73 base::Closure delete_callback_; | 77 base::Closure delete_callback_; |
74 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; | 78 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; |
75 | 79 |
76 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); | 80 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); |
77 }; | 81 }; |
78 | 82 |
79 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 83 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
OLD | NEW |