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

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..791f761b0a5ea0fc8d01f4a6761faaf3be63096d 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,11 +152,13 @@ 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(

Powered by Google App Engine
This is Rietveld 408576698