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 EXTENSIONS_BROWSER_API_HID_HID_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_HID_HID_API_H_ |
6 #define EXTENSIONS_BROWSER_API_HID_HID_API_H_ | 6 #define EXTENSIONS_BROWSER_API_HID_HID_API_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 private: | 59 private: |
60 ~HidGetUserSelectedDevicesFunction() override; | 60 ~HidGetUserSelectedDevicesFunction() override; |
61 | 61 |
62 // ExtensionFunction: | 62 // ExtensionFunction: |
63 ResponseAction Run() override; | 63 ResponseAction Run() override; |
64 | 64 |
65 void OnDevicesChosen( | 65 void OnDevicesChosen( |
66 const std::vector<scoped_refptr<device::HidDeviceInfo>>& devices); | 66 const std::vector<scoped_refptr<device::HidDeviceInfo>>& devices); |
67 | 67 |
68 HidDeviceManager* device_manager_; | |
69 std::unique_ptr<DevicePermissionsPrompt> prompt_; | 68 std::unique_ptr<DevicePermissionsPrompt> prompt_; |
70 | 69 |
71 DISALLOW_COPY_AND_ASSIGN(HidGetUserSelectedDevicesFunction); | 70 DISALLOW_COPY_AND_ASSIGN(HidGetUserSelectedDevicesFunction); |
72 }; | 71 }; |
73 | 72 |
74 class HidConnectFunction : public UIThreadExtensionFunction { | 73 class HidConnectFunction : public UIThreadExtensionFunction { |
75 public: | 74 public: |
76 DECLARE_EXTENSION_FUNCTION("hid.connect", HID_CONNECT); | 75 DECLARE_EXTENSION_FUNCTION("hid.connect", HID_CONNECT); |
77 | 76 |
78 HidConnectFunction(); | 77 HidConnectFunction(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 void OnFinished(bool success); | 206 void OnFinished(bool success); |
208 | 207 |
209 std::unique_ptr<api::hid::SendFeatureReport::Params> parameters_; | 208 std::unique_ptr<api::hid::SendFeatureReport::Params> parameters_; |
210 | 209 |
211 DISALLOW_COPY_AND_ASSIGN(HidSendFeatureReportFunction); | 210 DISALLOW_COPY_AND_ASSIGN(HidSendFeatureReportFunction); |
212 }; | 211 }; |
213 | 212 |
214 } // namespace extensions | 213 } // namespace extensions |
215 | 214 |
216 #endif // EXTENSIONS_BROWSER_API_HID_HID_API_H_ | 215 #endif // EXTENSIONS_BROWSER_API_HID_HID_API_H_ |
OLD | NEW |