| Index: chrome/common/extensions/extension.h
|
| diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
|
| index 74322094c70639a2a89e849e5ccc3056b1df41cb..5cec95f97714a89eb1114ddb2b1b187ad4fee4be 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_
|
|
|