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 the APIPermissions instances. It is only
15 // needed at startup time.
16 class PermissionsProvider
{
18 // An alias for a given permission |name|.
23 AliasInfo(const char* name
, const char* alias
)
24 : name(name
), alias(alias
) {
27 // Returns all the known permissions. The caller, PermissionsInfo,
28 // takes ownership of the APIPermissionInfos.
29 virtual std::vector
<APIPermissionInfo
*> GetAllPermissions() const = 0;
31 // Returns all the known permission aliases.
32 virtual std::vector
<AliasInfo
> GetAllAliases() const = 0;
35 } // namespace extensions
37 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_PROVIDER_H_