| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 } | 731 } |
| 732 const std::vector<std::string>& background_scripts() const { | 732 const std::vector<std::string>& background_scripts() const { |
| 733 return background_scripts_; | 733 return background_scripts_; |
| 734 } | 734 } |
| 735 bool has_persistent_background_page() const { | 735 bool has_persistent_background_page() const { |
| 736 return has_background_page() && background_page_is_persistent_; | 736 return has_background_page() && background_page_is_persistent_; |
| 737 } | 737 } |
| 738 bool has_lazy_background_page() const { | 738 bool has_lazy_background_page() const { |
| 739 return has_background_page() && !background_page_is_persistent_; | 739 return has_background_page() && !background_page_is_persistent_; |
| 740 } | 740 } |
| 741 const GURL& options_url() const { return options_url_; } | |
| 742 const GURL& details_url() const { return details_url_;} | 741 const GURL& details_url() const { return details_url_;} |
| 743 const PermissionSet* optional_permission_set() const { | 742 const PermissionSet* optional_permission_set() const { |
| 744 return optional_permission_set_.get(); | 743 return optional_permission_set_.get(); |
| 745 } | 744 } |
| 746 const PermissionSet* required_permission_set() const { | 745 const PermissionSet* required_permission_set() const { |
| 747 return required_permission_set_.get(); | 746 return required_permission_set_.get(); |
| 748 } | 747 } |
| 749 // Appends |new_warnings| to install_warnings(). | 748 // Appends |new_warnings| to install_warnings(). |
| 750 void AddInstallWarnings(const InstallWarningVector& new_warnings); | 749 void AddInstallWarnings(const InstallWarningVector& new_warnings); |
| 751 const InstallWarningVector& install_warnings() const { | 750 const InstallWarningVector& install_warnings() const { |
| 752 return install_warnings_; | 751 return install_warnings_; |
| 753 } | 752 } |
| 754 const GURL& update_url() const { return update_url_; } | |
| 755 const ExtensionIconSet& icons() const { return icons_; } | 753 const ExtensionIconSet& icons() const { return icons_; } |
| 756 const extensions::Manifest* manifest() const { | 754 const extensions::Manifest* manifest() const { |
| 757 return manifest_.get(); | 755 return manifest_.get(); |
| 758 } | 756 } |
| 759 const std::string default_locale() const { return default_locale_; } | 757 const std::string default_locale() const { return default_locale_; } |
| 760 const URLOverrideMap& GetChromeURLOverrides() const { | 758 const URLOverrideMap& GetChromeURLOverrides() const { |
| 761 return chrome_url_overrides_; | 759 return chrome_url_overrides_; |
| 762 } | 760 } |
| 763 bool incognito_split_mode() const { return incognito_split_mode_; } | 761 bool incognito_split_mode() const { return incognito_split_mode_; } |
| 764 bool offline_enabled() const { return offline_enabled_; } | 762 bool offline_enabled() const { return offline_enabled_; } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 const char* list_error, | 891 const char* list_error, |
| 894 const char* value_error, | 892 const char* value_error, |
| 895 string16* error); | 893 string16* error); |
| 896 bool LoadLaunchContainer(string16* error); | 894 bool LoadLaunchContainer(string16* error); |
| 897 bool LoadLaunchURL(string16* error); | 895 bool LoadLaunchURL(string16* error); |
| 898 | 896 |
| 899 bool LoadSharedFeatures(const APIPermissionSet& api_permissions, | 897 bool LoadSharedFeatures(const APIPermissionSet& api_permissions, |
| 900 string16* error); | 898 string16* error); |
| 901 bool LoadDescription(string16* error); | 899 bool LoadDescription(string16* error); |
| 902 bool LoadManifestVersion(string16* error); | 900 bool LoadManifestVersion(string16* error); |
| 903 bool LoadUpdateURL(string16* error); | |
| 904 bool LoadIcons(string16* error); | 901 bool LoadIcons(string16* error); |
| 905 bool LoadCommands(string16* error); | 902 bool LoadCommands(string16* error); |
| 906 bool LoadPlugins(string16* error); | 903 bool LoadPlugins(string16* error); |
| 907 bool LoadNaClModules(string16* error); | 904 bool LoadNaClModules(string16* error); |
| 908 bool LoadWebAccessibleResources(string16* error); | 905 bool LoadWebAccessibleResources(string16* error); |
| 909 bool LoadSandboxedPages(string16* error); | 906 bool LoadSandboxedPages(string16* error); |
| 910 // Must be called after LoadPlugins(). | 907 // Must be called after LoadPlugins(). |
| 911 bool LoadRequirements(string16* error); | 908 bool LoadRequirements(string16* error); |
| 912 bool LoadDefaultLocale(string16* error); | 909 bool LoadDefaultLocale(string16* error); |
| 913 bool LoadOfflineEnabled(string16* error); | 910 bool LoadOfflineEnabled(string16* error); |
| 914 bool LoadOptionsPage(string16* error); | |
| 915 bool LoadBackgroundScripts(string16* error); | 911 bool LoadBackgroundScripts(string16* error); |
| 916 bool LoadBackgroundScripts(const std::string& key, string16* error); | 912 bool LoadBackgroundScripts(const std::string& key, string16* error); |
| 917 bool LoadBackgroundPage(const APIPermissionSet& api_permissions, | 913 bool LoadBackgroundPage(const APIPermissionSet& api_permissions, |
| 918 string16* error); | 914 string16* error); |
| 919 bool LoadBackgroundPage(const std::string& key, | 915 bool LoadBackgroundPage(const std::string& key, |
| 920 const APIPermissionSet& api_permissions, | 916 const APIPermissionSet& api_permissions, |
| 921 string16* error); | 917 string16* error); |
| 922 bool LoadBackgroundPersistent( | 918 bool LoadBackgroundPersistent( |
| 923 const APIPermissionSet& api_permissions, | 919 const APIPermissionSet& api_permissions, |
| 924 string16* error); | 920 string16* error); |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 // True if the background page should stay loaded forever; false if it should | 1135 // True if the background page should stay loaded forever; false if it should |
| 1140 // load on-demand (when it needs to handle an event). Defaults to true. | 1136 // load on-demand (when it needs to handle an event). Defaults to true. |
| 1141 bool background_page_is_persistent_; | 1137 bool background_page_is_persistent_; |
| 1142 | 1138 |
| 1143 // True if the background page can be scripted by pages of the app or | 1139 // True if the background page can be scripted by pages of the app or |
| 1144 // extension, in which case all such pages must run in the same process. | 1140 // extension, in which case all such pages must run in the same process. |
| 1145 // False if such pages are not permitted to script the background page, | 1141 // False if such pages are not permitted to script the background page, |
| 1146 // allowing them to run in different processes. | 1142 // allowing them to run in different processes. |
| 1147 bool allow_background_js_access_; | 1143 bool allow_background_js_access_; |
| 1148 | 1144 |
| 1149 // Optional URL to a page for setting options/preferences. | |
| 1150 GURL options_url_; | |
| 1151 | |
| 1152 // URL to the webstore page of the extension. | 1145 // URL to the webstore page of the extension. |
| 1153 GURL details_url_; | 1146 GURL details_url_; |
| 1154 | 1147 |
| 1155 // The public key used to sign the contents of the crx package. | 1148 // The public key used to sign the contents of the crx package. |
| 1156 std::string public_key_; | 1149 std::string public_key_; |
| 1157 | 1150 |
| 1158 // A map of resource id's to relative file paths. | 1151 // A map of resource id's to relative file paths. |
| 1159 scoped_ptr<base::DictionaryValue> theme_images_; | 1152 scoped_ptr<base::DictionaryValue> theme_images_; |
| 1160 | 1153 |
| 1161 // A map of color names to colors. | 1154 // A map of color names to colors. |
| 1162 scoped_ptr<base::DictionaryValue> theme_colors_; | 1155 scoped_ptr<base::DictionaryValue> theme_colors_; |
| 1163 | 1156 |
| 1164 // A map of color names to colors. | 1157 // A map of color names to colors. |
| 1165 scoped_ptr<base::DictionaryValue> theme_tints_; | 1158 scoped_ptr<base::DictionaryValue> theme_tints_; |
| 1166 | 1159 |
| 1167 // A map of display properties. | 1160 // A map of display properties. |
| 1168 scoped_ptr<base::DictionaryValue> theme_display_properties_; | 1161 scoped_ptr<base::DictionaryValue> theme_display_properties_; |
| 1169 | 1162 |
| 1170 // URL for fetching an update manifest | |
| 1171 GURL update_url_; | |
| 1172 | |
| 1173 // The manifest from which this extension was created. | 1163 // The manifest from which this extension was created. |
| 1174 scoped_ptr<Manifest> manifest_; | 1164 scoped_ptr<Manifest> manifest_; |
| 1175 | 1165 |
| 1176 // Stored parsed manifest data. | 1166 // Stored parsed manifest data. |
| 1177 ManifestDataMap manifest_data_; | 1167 ManifestDataMap manifest_data_; |
| 1178 | 1168 |
| 1179 // Set to true at the end of InitValue when initialization is finished. | 1169 // Set to true at the end of InitValue when initialization is finished. |
| 1180 bool finished_parsing_manifest_; | 1170 bool finished_parsing_manifest_; |
| 1181 | 1171 |
| 1182 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs | 1172 // A map of chrome:// hostnames (newtab, downloads, etc.) to Extension URLs |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 | 1289 |
| 1300 UpdatedExtensionPermissionsInfo( | 1290 UpdatedExtensionPermissionsInfo( |
| 1301 const Extension* extension, | 1291 const Extension* extension, |
| 1302 const PermissionSet* permissions, | 1292 const PermissionSet* permissions, |
| 1303 Reason reason); | 1293 Reason reason); |
| 1304 }; | 1294 }; |
| 1305 | 1295 |
| 1306 } // namespace extensions | 1296 } // namespace extensions |
| 1307 | 1297 |
| 1308 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1298 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |