Index: chrome/common/extensions/extension.h |
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h |
index 5216471f2a5efda80ea1702b3cddf755c5082f2a..22ca9fb9e72f599c8d42e0856c963e19a6256461 100644 |
--- a/chrome/common/extensions/extension.h |
+++ b/chrome/common/extensions/extension.h |
@@ -112,6 +112,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
DISABLE_USER_ACTION = 1 << 0, |
DISABLE_PERMISSIONS_INCREASE = 1 << 1, |
DISABLE_RELOAD = 1 << 2, |
+ DISABLE_UNSUPPORTED_REQUIREMENT = 1 << 3 |
}; |
enum InstallType { |
@@ -140,6 +141,16 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
SYNC_TYPE_APP |
}; |
+ // Declared requirements for the extension. |
+ struct Requirements { |
+ Requirements(); |
+ ~Requirements(); |
+ |
+ bool webgl; |
+ bool css3d; |
+ bool npapi; |
+ }; |
+ |
// An NPAPI plugin included in the extension. |
struct PluginInfo { |
FilePath path; // Path to the plugin. |
@@ -592,6 +603,7 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
// Accessors: |
+ const Requirements& requirements() const { return requirements_; } |
const FilePath& path() const { return path_; } |
const GURL& url() const { return extension_url_; } |
Location location() const; |
@@ -830,6 +842,8 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
bool LoadNaClModules(string16* error); |
bool LoadWebAccessibleResources(string16* error); |
bool LoadSandboxedPages(string16* error); |
+ // Must be called after LoadPlugins(). |
+ bool LoadRequirements(string16* error); |
bool LoadDefaultLocale(string16* error); |
bool LoadOfflineEnabled(string16* error); |
bool LoadOptionsPage(string16* error); |
@@ -933,7 +947,6 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
const APIPermissionSet& permissions) const; |
bool CheckMinimumChromeVersion(string16* error) const; |
- bool CheckRequirements(string16* error) const; |
// Check that platform app features are valid. Called after InitFromValue. |
bool CheckPlatformAppFeatures(std::string* utf8_error) const; |
@@ -963,6 +976,9 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
// the case when we know the manifest version actually is 1. |
int manifest_version_; |
+ // The requirements declared in the manifest. |
+ Requirements requirements_; |
+ |
// The absolute path to the directory the extension is stored in. |
FilePath path_; |