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 // TODO(sashab): Remove all permission messages from this class, moving the
18 // permission message rules into ChromePermissionMessageProvider.
19 class PermissionsProvider
{
21 // An alias for a given permission |name|.
26 AliasInfo(const char* name
, const char* alias
)
27 : name(name
), alias(alias
) {
30 // Returns all the known permissions. The caller, PermissionsInfo,
31 // takes ownership of the APIPermissionInfos.
32 virtual std::vector
<APIPermissionInfo
*> GetAllPermissions() const = 0;
34 // Returns all the known permission aliases.
35 virtual std::vector
<AliasInfo
> GetAllAliases() const = 0;
38 } // namespace extensions
40 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_PROVIDER_H_