| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 void SetOmniboxSpeculation() override; | 51 void SetOmniboxSpeculation() override; |
| 52 bool WasEverUsed() const override; | 52 bool WasEverUsed() const override; |
| 53 bool WasNpnNegotiated() const override; | 53 bool WasNpnNegotiated() const override; |
| 54 net::NextProto GetNegotiatedProtocol() const override; | 54 net::NextProto GetNegotiatedProtocol() const override; |
| 55 bool GetSSLInfo(net::SSLInfo* ssl_info) override; | 55 bool GetSSLInfo(net::SSLInfo* ssl_info) override; |
| 56 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; | 56 void GetConnectionAttempts(net::ConnectionAttempts* out) const override; |
| 57 void ClearConnectionAttempts() override {} | 57 void ClearConnectionAttempts() override {} |
| 58 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { | 58 void AddConnectionAttempts(const net::ConnectionAttempts& attempts) override { |
| 59 } | 59 } |
| 60 int64_t GetTotalReceivedBytes() const override; | 60 int64_t GetTotalReceivedBytes() const override; |
| 61 void DumpMemoryStats( |
| 62 base::trace_event::MemoryAllocatorDump* dump) const override {} |
| 61 | 63 |
| 62 private: | 64 private: |
| 63 void RespondToReader(bool disconnect); | 65 void RespondToReader(bool disconnect); |
| 64 void RespondToWriter(int result); | 66 void RespondToWriter(int result); |
| 65 | 67 |
| 66 scoped_refptr<AndroidUsbDevice> device_; | 68 scoped_refptr<AndroidUsbDevice> device_; |
| 67 std::string command_; | 69 std::string command_; |
| 68 uint32_t local_id_; | 70 uint32_t local_id_; |
| 69 uint32_t remote_id_; | 71 uint32_t remote_id_; |
| 70 net::NetLogWithSource net_log_; | 72 net::NetLogWithSource net_log_; |
| 71 bool is_connected_; | 73 bool is_connected_; |
| 72 std::string read_buffer_; | 74 std::string read_buffer_; |
| 73 scoped_refptr<net::IOBuffer> read_io_buffer_; | 75 scoped_refptr<net::IOBuffer> read_io_buffer_; |
| 74 int read_length_; | 76 int read_length_; |
| 75 int write_length_; | 77 int write_length_; |
| 76 net::CompletionCallback connect_callback_; | 78 net::CompletionCallback connect_callback_; |
| 77 net::CompletionCallback read_callback_; | 79 net::CompletionCallback read_callback_; |
| 78 net::CompletionCallback write_callback_; | 80 net::CompletionCallback write_callback_; |
| 79 base::Closure delete_callback_; | 81 base::Closure delete_callback_; |
| 80 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; | 82 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; |
| 81 | 83 |
| 82 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); | 84 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 87 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
| OLD | NEW |