OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_USB_USB_DEVICE_RESOURCE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_USB_USB_DEVICE_RESOURCE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_USB_USB_DEVICE_RESOURCE_H_ | 6 #define EXTENSIONS_BROWSER_API_USB_USB_DEVICE_RESOURCE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
15 #include "chrome/common/extensions/api/usb.h" | |
16 #include "components/usb_service/usb_device_handle.h" | 15 #include "components/usb_service/usb_device_handle.h" |
17 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
18 #include "extensions/browser/api/api_resource.h" | 17 #include "extensions/browser/api/api_resource.h" |
19 #include "extensions/browser/api/api_resource_manager.h" | 18 #include "extensions/browser/api/api_resource_manager.h" |
| 19 #include "extensions/common/api/usb.h" |
20 | 20 |
21 namespace net { | 21 namespace net { |
22 class IOBuffer; | 22 class IOBuffer; |
23 } // namespace net | 23 } // namespace net |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 | 26 |
27 // A UsbDeviceResource is an ApiResource wrapper for a UsbDevice. | 27 // A UsbDeviceResource is an ApiResource wrapper for a UsbDevice. |
28 class UsbDeviceResource : public ApiResource { | 28 class UsbDeviceResource : public ApiResource { |
29 public: | 29 public: |
(...skipping 10 matching lines...) Expand all Loading... |
40 friend class ApiResourceManager<UsbDeviceResource>; | 40 friend class ApiResourceManager<UsbDeviceResource>; |
41 static const char* service_name() { return "UsbDeviceResourceManager"; } | 41 static const char* service_name() { return "UsbDeviceResourceManager"; } |
42 | 42 |
43 scoped_refptr<usb_service::UsbDeviceHandle> device_; | 43 scoped_refptr<usb_service::UsbDeviceHandle> device_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(UsbDeviceResource); | 45 DISALLOW_COPY_AND_ASSIGN(UsbDeviceResource); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace extensions | 48 } // namespace extensions |
49 | 49 |
50 #endif // CHROME_BROWSER_EXTENSIONS_API_USB_USB_DEVICE_RESOURCE_H_ | 50 #endif // EXTENSIONS_BROWSER_API_USB_USB_DEVICE_RESOURCE_H_ |
OLD | NEW |