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 DEVICE_USB_USB_DEVICE_IMPL_H_ | 5 #ifndef DEVICE_USB_USB_DEVICE_IMPL_H_ |
6 #define DEVICE_USB_USB_DEVICE_IMPL_H_ | 6 #define DEVICE_USB_USB_DEVICE_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 // Called by UsbDeviceHandleImpl. | 91 // Called by UsbDeviceHandleImpl. |
92 void Close(scoped_refptr<UsbDeviceHandle> handle); | 92 void Close(scoped_refptr<UsbDeviceHandle> handle); |
93 void RefreshActiveConfiguration(); | 93 void RefreshActiveConfiguration(); |
94 | 94 |
95 private: | 95 private: |
96 void GetAllConfigurations(); | 96 void GetAllConfigurations(); |
97 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
98 void OnOpenRequestComplete(const OpenCallback& callback, | 98 void OnOpenRequestComplete(const OpenCallback& callback, |
99 dbus::FileDescriptor fd); | 99 dbus::FileDescriptor fd); |
| 100 void OnOpenRequestError(const OpenCallback& callback, |
| 101 const std::string& error_name, |
| 102 const std::string& error_message); |
100 void OpenOnBlockingThreadWithFd(dbus::FileDescriptor fd, | 103 void OpenOnBlockingThreadWithFd(dbus::FileDescriptor fd, |
101 const OpenCallback& callback); | 104 const OpenCallback& callback); |
102 #endif | 105 #endif |
103 void OpenOnBlockingThread(const OpenCallback& callback); | 106 void OpenOnBlockingThread(const OpenCallback& callback); |
104 void Opened(PlatformUsbDeviceHandle platform_handle, | 107 void Opened(PlatformUsbDeviceHandle platform_handle, |
105 const OpenCallback& callback); | 108 const OpenCallback& callback); |
106 | 109 |
107 base::ThreadChecker thread_checker_; | 110 base::ThreadChecker thread_checker_; |
108 PlatformUsbDevice platform_device_; | 111 PlatformUsbDevice platform_device_; |
109 bool visited_ = false; | 112 bool visited_ = false; |
(...skipping 16 matching lines...) Expand all Loading... |
126 | 129 |
127 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 130 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
128 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 131 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
129 | 132 |
130 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); | 133 DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl); |
131 }; | 134 }; |
132 | 135 |
133 } // namespace device | 136 } // namespace device |
134 | 137 |
135 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_ | 138 #endif // DEVICE_USB_USB_DEVICE_IMPL_H_ |
OLD | NEW |