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_DEVICE_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ |
6 #define EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 10 matching lines...) Expand all Loading... |
21 class HidDeviceFilter; | 21 class HidDeviceFilter; |
22 } | 22 } |
23 | 23 |
24 namespace extensions { | 24 namespace extensions { |
25 | 25 |
26 class Extension; | 26 class Extension; |
27 | 27 |
28 class HidDeviceManager : public BrowserContextKeyedAPI { | 28 class HidDeviceManager : public BrowserContextKeyedAPI { |
29 public: | 29 public: |
30 explicit HidDeviceManager(content::BrowserContext* context); | 30 explicit HidDeviceManager(content::BrowserContext* context); |
31 virtual ~HidDeviceManager(); | 31 ~HidDeviceManager() override; |
32 | 32 |
33 // BrowserContextKeyedAPI implementation. | 33 // BrowserContextKeyedAPI implementation. |
34 static BrowserContextKeyedAPIFactory<HidDeviceManager>* GetFactoryInstance(); | 34 static BrowserContextKeyedAPIFactory<HidDeviceManager>* GetFactoryInstance(); |
35 | 35 |
36 // Convenience method to get the HidDeviceManager for a profile. | 36 // Convenience method to get the HidDeviceManager for a profile. |
37 static HidDeviceManager* Get(content::BrowserContext* context) { | 37 static HidDeviceManager* Get(content::BrowserContext* context) { |
38 return BrowserContextKeyedAPIFactory<HidDeviceManager>::Get(context); | 38 return BrowserContextKeyedAPIFactory<HidDeviceManager>::Get(context); |
39 } | 39 } |
40 | 40 |
41 scoped_ptr<base::ListValue> GetApiDevices( | 41 scoped_ptr<base::ListValue> GetApiDevices( |
(...skipping 22 matching lines...) Expand all Loading... |
64 | 64 |
65 ResourceIdToDeviceIdMap device_ids_; | 65 ResourceIdToDeviceIdMap device_ids_; |
66 DeviceIdToResourceIdMap resource_ids_; | 66 DeviceIdToResourceIdMap resource_ids_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(HidDeviceManager); | 68 DISALLOW_COPY_AND_ASSIGN(HidDeviceManager); |
69 }; | 69 }; |
70 | 70 |
71 } // namespace extensions | 71 } // namespace extensions |
72 | 72 |
73 #endif // EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ | 73 #endif // EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ |
OLD | NEW |