1 // Copyright 2013 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_BLUETOOTH_PERMISSION_H_
6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_BLUETOOTH_PERMISSION_H_
10 #include "chrome/common/extensions/permissions/bluetooth_permission_data.h"
11 #include "chrome/common/extensions/permissions/set_disjunction_permission.h"
12 #include "extensions/common/permissions/api_permission.h"
14 namespace extensions
{
16 // BluetoothPermission represents the permission to implement a specific
18 class BluetoothPermission
19 : public SetDisjunctionPermission
<BluetoothPermissionData
,
20 BluetoothPermission
> {
22 // A Bluetooth profile uuid that should be checked for permission to access.
23 struct CheckParam
: APIPermission::CheckParam
{
24 explicit CheckParam(std::string uuid
)
26 const std::string uuid
;
29 explicit BluetoothPermission(const APIPermissionInfo
* info
);
30 virtual ~BluetoothPermission();
32 // SetDisjunctionPermission overrides.
33 // BluetoothPermission permits an empty list for gaining permission to the
34 // Bluetooth APIs without implementing a profile.
35 virtual bool FromValue(const base::Value
* value
) OVERRIDE
;
37 // APIPermission overrides
38 virtual PermissionMessages
GetMessages() const OVERRIDE
;
41 } // namespace extensions
43 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_BLUETOOTH_PERMISSION_H_