| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_ADB_ANDROID_USB_DEVICE_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_ADB_ANDROID_USB_DEVICE_H_ |
| 6 #define CHROME_BROWSER_DEVTOOLS_ADB_ANDROID_USB_DEVICE_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_ADB_ANDROID_USB_DEVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 uint32 arg0, | 86 uint32 arg0, |
| 87 uint32 arg1, | 87 uint32 arg1, |
| 88 const std::string& body); | 88 const std::string& body); |
| 89 | 89 |
| 90 scoped_refptr<UsbDeviceHandle> usb_device() { return usb_device_; } | 90 scoped_refptr<UsbDeviceHandle> usb_device() { return usb_device_; } |
| 91 | 91 |
| 92 std::string serial() { return serial_; } | 92 std::string serial() { return serial_; } |
| 93 | 93 |
| 94 bool terminated() { return terminated_; } | 94 bool terminated() { return terminated_; } |
| 95 | 95 |
| 96 bool is_connected() { return is_connected_; } |
| 97 |
| 96 private: | 98 private: |
| 97 friend class base::RefCountedThreadSafe<AndroidUsbDevice>; | 99 friend class base::RefCountedThreadSafe<AndroidUsbDevice>; |
| 98 virtual ~AndroidUsbDevice(); | 100 virtual ~AndroidUsbDevice(); |
| 99 | 101 |
| 100 void Queue(scoped_refptr<AdbMessage> message); | 102 void Queue(scoped_refptr<AdbMessage> message); |
| 101 void ProcessOutgoing(); | 103 void ProcessOutgoing(); |
| 102 void OutgoingMessageSent(UsbTransferStatus status, | 104 void OutgoingMessageSent(UsbTransferStatus status, |
| 103 scoped_refptr<net::IOBuffer> buffer, | 105 scoped_refptr<net::IOBuffer> buffer, |
| 104 size_t result); | 106 size_t result); |
| 105 | 107 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 std::queue<BulkMessage> outgoing_queue_; | 153 std::queue<BulkMessage> outgoing_queue_; |
| 152 | 154 |
| 153 // Outgoing messages pending connect | 155 // Outgoing messages pending connect |
| 154 typedef std::vector<scoped_refptr<AdbMessage> > PendingMessages; | 156 typedef std::vector<scoped_refptr<AdbMessage> > PendingMessages; |
| 155 PendingMessages pending_messages_; | 157 PendingMessages pending_messages_; |
| 156 | 158 |
| 157 DISALLOW_COPY_AND_ASSIGN(AndroidUsbDevice); | 159 DISALLOW_COPY_AND_ASSIGN(AndroidUsbDevice); |
| 158 }; | 160 }; |
| 159 | 161 |
| 160 #endif // CHROME_BROWSER_DEVTOOLS_ADB_ANDROID_USB_DEVICE_H_ | 162 #endif // CHROME_BROWSER_DEVTOOLS_ADB_ANDROID_USB_DEVICE_H_ |
| OLD | NEW |