Chromium Code Reviews| Index: extensions/common/permissions/api_permission.h |
| diff --git a/extensions/common/permissions/api_permission.h b/extensions/common/permissions/api_permission.h |
| index 924412b01af6589ca172cb9745578aba9a6874ff..c0f88e3eaa740d77312498fddb5241300b1dffc4 100644 |
| --- a/extensions/common/permissions/api_permission.h |
| +++ b/extensions/common/permissions/api_permission.h |
| @@ -21,6 +21,7 @@ class Message; |
| namespace extensions { |
| +class PermissionIDSet; |
| class APIPermissionInfo; |
| class ChromeAPIPermissions; |
| @@ -215,13 +216,18 @@ class APIPermission { |
| kHostReadWrite, |
| kHostsAll, |
| kHostsAllReadOnly, |
| + kMediaGalleriesAllGalleriesCopyTo, |
| + kMediaGalleriesAllGalleriesDelete, |
| + kMediaGalleriesAllGalleriesRead, |
| + kNetworkState, |
| kOverrideBookmarksUI, |
| + kShouldWarnAllHosts, |
| kSocketAnyHost, |
| - kSocketDomainHostsSingular, |
| - kSocketDomainHostsPlural, |
| - kSocketSpecificHostsSingular, |
| - kSocketSpecificHostsPlural, |
| - kNetworkState, |
| + kSocketDomainHosts, |
| + kSocketSpecificHosts, |
| + kUsbDeviceList, |
| + kUsbDeviceUnknownProduct, |
| + kUsbDeviceUnknownVendor, |
| kEnumBoundary |
| }; |
| @@ -244,10 +250,17 @@ class APIPermission { |
| return info_; |
| } |
| + // The set of permissions this API permission has. These permissions are used |
|
Yoyo Zhou
2014/12/11 00:54:11
I would appreciate more explanation here to clarif
sashab
2014/12/11 04:15:36
Good point, and the main thing to get across here
|
| + // by PermissionMessageProvider to generate meaningful permission messages |
| + // for the app. |
| + virtual PermissionIDSet GetPermissions() const = 0; |
| + |
| // Returns true if this permission has any PermissionMessages. |
| + // TODO(sashab): Deprecate this in favor of GetPermissions() above. |
| virtual bool HasMessages() const = 0; |
| // Returns the localized permission messages of this permission. |
| + // TODO(sashab): Deprecate this in favor of GetPermissions() above. |
| virtual PermissionMessages GetMessages() const = 0; |
| // Returns true if the given permission is allowed. |