Blink roll 25b6bd3a7a131ffe68d809546ad1a20707915cdc:3a503f41ae42e5b79cfcd2ff10e65afde...
[chromium-blink-merge.git] / extensions / common / permissions / usb_device_permission.h
blobcb19f3e937bb81621ea19cdea71f00f8bb2458dc
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 ~UsbDevicePermission() override;
32 // APIPermission overrides
33 PermissionMessages GetMessages() const override;
36 } // namespace extensions
38 #endif // EXTENSIONS_COMMON_PERMISSIONS_USB_DEVICE_PERMISSION_H_