Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / common / extensions / permissions / usb_device_permission.h
blob3e599f099247d864eb0943a0de02492ca7cb5504
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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_USB_DEVICE_PERMISSION_H_
6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_USB_DEVICE_PERMISSION_H_
8 #include "base/basictypes.h"
9 #include "chrome/common/extensions/permissions/set_disjunction_permission.h"
10 #include "chrome/common/extensions/permissions/usb_device_permission_data.h"
11 #include "extensions/common/permissions/api_permission.h"
13 namespace extensions {
15 class UsbDevicePermission
16 : public SetDisjunctionPermission<UsbDevicePermissionData,
17 UsbDevicePermission> {
18 public:
19 struct CheckParam : public APIPermission::CheckParam {
20 CheckParam(uint16 vendor_id, uint16 product_id, int interface_id)
21 : vendor_id(vendor_id),
22 product_id(product_id),
23 interface_id(interface_id) {}
24 const uint16 vendor_id;
25 const uint16 product_id;
26 const int interface_id;
29 explicit UsbDevicePermission(const APIPermissionInfo* info);
30 virtual ~UsbDevicePermission();
32 // APIPermission overrides
33 virtual PermissionMessages GetMessages() const OVERRIDE;
36 } // namespace extensions
38 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_USB_DEVICE_PERMISSION_H_