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 EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_PROVIDER_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_PROVIDER_H_
10 namespace extensions
{
12 class APIPermissionInfo
;
14 // The PermissionsProvider creates APIPermissions instances. It is only
15 // needed at startup time. Typically, ExtensionsClient will register
16 // its PermissionsProviders with the global PermissionsInfo at startup.
17 class PermissionsProvider
{
19 // An alias for a given permission |name|.
24 AliasInfo(const char* name
, const char* alias
)
25 : name(name
), alias(alias
) {
28 // Returns all the known permissions. The caller, PermissionsInfo,
29 // takes ownership of the APIPermissionInfos.
30 virtual std::vector
<APIPermissionInfo
*> GetAllPermissions() const = 0;
32 // Returns all the known permission aliases.
33 virtual std::vector
<AliasInfo
> GetAllAliases() const = 0;
36 } // namespace extensions
38 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_PROVIDER_H_