first cut at experimental topsites extension api
only provides a "get" method
BUG=100394
TEST=example extension
Review URL: http://codereview.chromium.org/8361023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107298 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index 79af4f0..912fa31 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -384,19 +384,6 @@
// mechanisms that are implicitly trusted.
bool CanSilentlyIncreasePermissions() const;
- // Returns true if this extension can specify |api|.
- bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api,
- std::string* error) const;
- bool CanSpecifyComponentOnlyPermission() const;
- bool CanSpecifyExperimentalPermission() const;
- bool CanSpecifyPermissionForHostedApp(
- const ExtensionAPIPermission* api) const;
-
- // Whether or not the extension is allowed permission for a URL pattern from
- // the manifest. http, https, and chrome://favicon/ is allowed for all
- // extensions, while component extensions are allowed access to
- // chrome://resources.
- bool CanSpecifyHostPermission(const URLPattern& pattern) const;
// Whether the extension has access to the given URL.
bool HasHostPermission(const GURL& url) const;
@@ -690,6 +677,19 @@
// |override_url|.
void OverrideLaunchUrl(const GURL& override_url);
+ // Returns true if this extension can specify |api|.
+ bool CanSpecifyAPIPermission(const ExtensionAPIPermission* api,
+ std::string* error) const;
+ bool CanSpecifyComponentOnlyPermission() const;
+ bool CanSpecifyExperimentalPermission() const;
+ bool CanSpecifyPermissionForHostedApp(
+ const ExtensionAPIPermission* api) const;
+
+ // Checks whether the host |pattern| is allowed for this extension, given API
+ // permissions |permissions|.
+ bool CanSpecifyHostPermission(const URLPattern& pattern,
+ const ExtensionAPIPermissionSet& permissions) const;
+
// Cached images for this extension. This should only be touched on the UI
// thread.
mutable ImageCache image_cache_;