Index: chrome/common/extensions/extension.h |
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h |
index d5070bdfb9f2cbe05f5c315031f6c323f0c4729d..853da2eab225bfa54abe245d95d7e297e577bd7c 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. |
@@ -587,6 +598,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; |
@@ -815,7 +827,8 @@ class Extension : public base::RefCountedThreadSafe<Extension> { |
bool LoadNaClModules(string16* error); |
bool LoadWebAccessibleResources(string16* error); |
bool LoadSandboxedPages(string16* error); |
- bool CheckRequirements(string16* error); |
+ // Must be called after LoadPlugins(). |
+ bool LoadRequirements(string16* error); |
bool LoadDefaultLocale(string16* error); |
bool LoadOfflineEnabled(string16* error); |
bool LoadOptionsPage(string16* error); |
@@ -946,6 +959,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_; |
@@ -1199,6 +1215,6 @@ struct UpdatedExtensionPermissionsInfo { |
Reason reason); |
}; |
-} // namespace extensions |
+} // namespace extensions |
#endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |