Index: extensions/common/manifest_handler.h |
diff --git a/extensions/common/manifest_handler.h b/extensions/common/manifest_handler.h |
index fd7b571e33666830d3d2bb98c6c80b7a1e7a8c50..db06e68430d329c973deea5ce19819a3332fba94 100644 |
--- a/extensions/common/manifest_handler.h |
+++ b/extensions/common/manifest_handler.h |
@@ -16,6 +16,8 @@ |
namespace extensions { |
class Extension; |
+class ManifestPermission; |
+class ManifestPermissionSet; |
// An interface for clients that recognize and parse keys in extension |
// manifests. |
@@ -64,6 +66,10 @@ class ManifestHandler { |
// (new MyManifestHandler)->Register(); |
void Register(); |
+ virtual ManifestPermission* CreatePermission(); |
Yoyo Zhou
2013/11/12 02:39:29
These new functions need documentation.
rpaquay
2013/11/12 21:40:31
Done.
|
+ virtual ManifestPermission* CreateInitialRequiredPermission( |
+ const Extension* extension); |
+ |
// Calling FinalizeRegistration indicates that there are no more |
// manifest handlers to be registered. |
static void FinalizeRegistration(); |
@@ -79,6 +85,11 @@ class ManifestHandler { |
std::string* error, |
std::vector<InstallWarning>* warnings); |
+ static ManifestPermission* CreatePermission(const std::string& name); |
+ |
+ static void AddExtensionRequiredPermissions( |
+ const Extension* extension, ManifestPermissionSet* permission_set); |
+ |
protected: |
// A convenience method for handlers that only register for 1 key, |
// so that they can define keys() { return SingleKey(kKey); } |
@@ -108,6 +119,11 @@ class ManifestHandlerRegistry { |
std::string* error, |
std::vector<InstallWarning>* warnings); |
+ ManifestPermission* CreatePermission(const std::string& name); |
+ |
+ void AddExtensionRequiredPermissions(const Extension* extension, |
+ ManifestPermissionSet* permission_set); |
+ |
// Overrides the current global ManifestHandlerRegistry with |
// |registry|, returning the current one. |
static ManifestHandlerRegistry* SetForTesting( |