Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / extensions / common / permissions / usb_device_permission.h
blob7f6b52a773f5dcdc0b525545bbfd1f710bbc04f2
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_H_
8 #include "base/basictypes.h"
9 #include "extensions/common/permissions/api_permission.h"
10 #include "extensions/common/permissions/set_disjunction_permission.h"
11 #include "extensions/common/permissions/usb_device_permission_data.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 // EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_H_