| 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 CHROME_BROWSER_EXTENSIONS_API_HID_HID_DEVICE_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/threading/thread_checker.h" | 14 #include "base/threading/thread_checker.h" |
| 15 #include "chrome/browser/profiles/profile.h" | |
| 16 #include "chrome/common/extensions/api/hid.h" | |
| 17 #include "device/hid/hid_device_info.h" | 15 #include "device/hid/hid_device_info.h" |
| 18 #include "extensions/browser/browser_context_keyed_api_factory.h" | 16 #include "extensions/browser/browser_context_keyed_api_factory.h" |
| 17 #include "extensions/common/api/hid.h" |
| 19 | 18 |
| 20 namespace extensions { | 19 namespace extensions { |
| 21 | 20 |
| 22 class HidDeviceManager : public BrowserContextKeyedAPI { | 21 class HidDeviceManager : public BrowserContextKeyedAPI { |
| 23 public: | 22 public: |
| 24 explicit HidDeviceManager(content::BrowserContext* context); | 23 explicit HidDeviceManager(content::BrowserContext* context); |
| 25 virtual ~HidDeviceManager(); | 24 virtual ~HidDeviceManager(); |
| 26 | 25 |
| 27 // BrowserContextKeyedAPI implementation. | 26 // BrowserContextKeyedAPI implementation. |
| 28 static BrowserContextKeyedAPIFactory<HidDeviceManager>* GetFactoryInstance(); | 27 static BrowserContextKeyedAPIFactory<HidDeviceManager>* GetFactoryInstance(); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 52 typedef std::map<device::HidDeviceId, int> DeviceIdToResourceIdMap; | 51 typedef std::map<device::HidDeviceId, int> DeviceIdToResourceIdMap; |
| 53 | 52 |
| 54 ResourceIdToDeviceIdMap device_ids_; | 53 ResourceIdToDeviceIdMap device_ids_; |
| 55 DeviceIdToResourceIdMap resource_ids_; | 54 DeviceIdToResourceIdMap resource_ids_; |
| 56 | 55 |
| 57 DISALLOW_COPY_AND_ASSIGN(HidDeviceManager); | 56 DISALLOW_COPY_AND_ASSIGN(HidDeviceManager); |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace extensions | 59 } // namespace extensions |
| 61 | 60 |
| 62 #endif // CHROME_BROWSER_EXTENSIONS_API_HID_HID_DEVICE_MANAGER_H_ | 61 #endif // EXTENSIONS_BROWSER_API_HID_HID_DEVICE_MANAGER_H_ |
| OLD | NEW |