Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: chrome/common/extensions/features/feature.h

Issue 12522004: Lazily load extension API schemas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « chrome/common/extensions/features/complex_feature.cc ('k') | chrome/common/extensions/features/manifest_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698