| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 USB_h | 5 #ifndef USB_h |
| 6 #define USB_h | 6 #define USB_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // ContextLifecycleObserver overrides. | 46 // ContextLifecycleObserver overrides. |
| 47 void contextDestroyed() override; | 47 void contextDestroyed() override; |
| 48 | 48 |
| 49 device::usb::wtf::DeviceManager* deviceManager() const { return m_deviceMana
ger.get(); } | 49 device::usb::wtf::DeviceManager* deviceManager() const { return m_deviceMana
ger.get(); } |
| 50 | 50 |
| 51 void onGetDevices(ScriptPromiseResolver*, mojo::WTFArray<device::usb::wtf::D
eviceInfoPtr>); | 51 void onGetDevices(ScriptPromiseResolver*, mojo::WTFArray<device::usb::wtf::D
eviceInfoPtr>); |
| 52 void onGetPermission(ScriptPromiseResolver*, device::usb::wtf::DeviceInfoPtr
); | 52 void onGetPermission(ScriptPromiseResolver*, device::usb::wtf::DeviceInfoPtr
); |
| 53 void onDeviceChanges(device::usb::wtf::DeviceChangeNotificationPtr); | 53 void onDeviceChanges(device::usb::wtf::DeviceChangeNotificationPtr); |
| 54 | 54 |
| 55 void onDeviceManagerConnectionError(); |
| 56 void onChooserServiceConnectionError(); |
| 57 |
| 55 DECLARE_VIRTUAL_TRACE(); | 58 DECLARE_VIRTUAL_TRACE(); |
| 56 | 59 |
| 57 private: | 60 private: |
| 58 explicit USB(LocalFrame& frame); | 61 explicit USB(LocalFrame& frame); |
| 59 | 62 |
| 60 device::usb::wtf::DeviceManagerPtr m_deviceManager; | 63 device::usb::wtf::DeviceManagerPtr m_deviceManager; |
| 61 HeapHashSet<Member<ScriptPromiseResolver>> m_deviceManagerRequests; | 64 HeapHashSet<Member<ScriptPromiseResolver>> m_deviceManagerRequests; |
| 62 device::usb::wtf::ChooserServicePtr m_chooserService; | 65 device::usb::wtf::ChooserServicePtr m_chooserService; |
| 63 HeapHashSet<Member<ScriptPromiseResolver>> m_chooserServiceRequests; | 66 HeapHashSet<Member<ScriptPromiseResolver>> m_chooserServiceRequests; |
| 64 }; | 67 }; |
| 65 | 68 |
| 66 } // namespace blink | 69 } // namespace blink |
| 67 | 70 |
| 68 #endif // USB_h | 71 #endif // USB_h |
| OLD | NEW |