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> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
16 #include "chrome/browser/devtools/device/usb/android_usb_device.h" | 16 #include "chrome/browser/devtools/device/usb/android_usb_device.h" |
17 #include "net/base/ip_endpoint.h" | 17 #include "net/base/ip_endpoint.h" |
18 #include "net/log/net_log_with_source.h" | 18 #include "net/log/net_log_with_source.h" |
19 #include "net/socket/stream_socket.h" | 19 #include "net/socket/stream_socket.h" |
20 | 20 |
21 namespace base { | |
22 class MessageLoop; | |
23 } | |
24 | |
25 class AndroidUsbSocket : public net::StreamSocket, | 21 class AndroidUsbSocket : public net::StreamSocket, |
26 public base::NonThreadSafe { | 22 public base::NonThreadSafe { |
27 public: | 23 public: |
28 AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device, | 24 AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device, |
29 uint32_t socket_id, | 25 uint32_t socket_id, |
30 const std::string& command, | 26 const std::string& command, |
31 base::Closure delete_callback); | 27 base::Closure delete_callback); |
32 ~AndroidUsbSocket() override; | 28 ~AndroidUsbSocket() override; |
33 | 29 |
34 void HandleIncoming(std::unique_ptr<AdbMessage> message); | 30 void HandleIncoming(std::unique_ptr<AdbMessage> message); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 net::CompletionCallback connect_callback_; | 76 net::CompletionCallback connect_callback_; |
81 net::CompletionCallback read_callback_; | 77 net::CompletionCallback read_callback_; |
82 net::CompletionCallback write_callback_; | 78 net::CompletionCallback write_callback_; |
83 base::Closure delete_callback_; | 79 base::Closure delete_callback_; |
84 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; | 80 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; |
85 | 81 |
86 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); | 82 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); |
87 }; | 83 }; |
88 | 84 |
89 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ | 85 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ |
OLD | NEW |