| Index: chrome/common/extensions/features/feature.h
|
| diff --git a/chrome/common/extensions/features/feature.h b/chrome/common/extensions/features/feature.h
|
| index 6eaa3a3b4f2106e6e74934a01a6c203b66946d06..53fa06bef270d2079d1fc49bb2976fc965043caf 100644
|
| --- a/chrome/common/extensions/features/feature.h
|
| +++ b/chrome/common/extensions/features/feature.h
|
| @@ -13,6 +13,8 @@
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/manifest.h"
|
|
|
| +class GURL;
|
| +
|
| namespace extensions {
|
|
|
| // Represents a single feature accessible to an extension developer, such as a
|
| @@ -55,6 +57,7 @@ class Feature {
|
| enum AvailabilityResult {
|
| IS_AVAILABLE,
|
| NOT_FOUND_IN_WHITELIST,
|
| + INVALID_URL,
|
| INVALID_TYPE,
|
| INVALID_CONTEXT,
|
| INVALID_LOCATION,
|
| @@ -149,15 +152,18 @@ class Feature {
|
| // Returns true if the feature is available to be used in the specified
|
| // extension and context.
|
| Availability IsAvailableToContext(const Extension* extension,
|
| - Context context) const {
|
| - return IsAvailableToContext(extension, context, GetCurrentPlatform());
|
| + Context context,
|
| + const GURL& url) const {
|
| + return IsAvailableToContext(extension, context, url, GetCurrentPlatform());
|
| }
|
| virtual Availability IsAvailableToContext(const Extension* extension,
|
| Context context,
|
| + const GURL& url,
|
| Platform platform) const = 0;
|
|
|
| - virtual std::string GetAvailabilityMessage(
|
| - AvailabilityResult result, Manifest::Type type) const = 0;
|
| + virtual std::string GetAvailabilityMessage(AvailabilityResult result,
|
| + Manifest::Type type,
|
| + const GURL& url) const = 0;
|
|
|
| protected:
|
| std::string name_;
|
|
|