| 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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 } | 676 } |
| 677 const std::vector<std::string>& background_scripts() const { | 677 const std::vector<std::string>& background_scripts() const { |
| 678 return background_scripts_; | 678 return background_scripts_; |
| 679 } | 679 } |
| 680 bool has_persistent_background_page() const { | 680 bool has_persistent_background_page() const { |
| 681 return has_background_page() && background_page_is_persistent_; | 681 return has_background_page() && background_page_is_persistent_; |
| 682 } | 682 } |
| 683 bool has_lazy_background_page() const { | 683 bool has_lazy_background_page() const { |
| 684 return has_background_page() && !background_page_is_persistent_; | 684 return has_background_page() && !background_page_is_persistent_; |
| 685 } | 685 } |
| 686 const GURL& options_url() const { return options_url_; } | |
| 687 const GURL& details_url() const { return details_url_;} | 686 const GURL& details_url() const { return details_url_;} |
| 688 const PermissionSet* optional_permission_set() const { | 687 const PermissionSet* optional_permission_set() const { |
| 689 return optional_permission_set_.get(); | 688 return optional_permission_set_.get(); |
| 690 } | 689 } |
| 691 const PermissionSet* required_permission_set() const { | 690 const PermissionSet* required_permission_set() const { |
| 692 return required_permission_set_.get(); | 691 return required_permission_set_.get(); |
| 693 } | 692 } |
| 694 // Appends |new_warnings| to install_warnings(). | 693 // Appends |new_warnings| to install_warnings(). |
| 695 void AddInstallWarnings(const InstallWarningVector& new_warnings); | 694 void AddInstallWarnings(const InstallWarningVector& new_warnings); |
| 696 const InstallWarningVector& install_warnings() const { | 695 const InstallWarningVector& install_warnings() const { |
| 697 return install_warnings_; | 696 return install_warnings_; |
| 698 } | 697 } |
| 699 const GURL& update_url() const { return update_url_; } | |
| 700 const ExtensionIconSet& icons() const { return icons_; } | 698 const ExtensionIconSet& icons() const { return icons_; } |
| 701 const extensions::Manifest* manifest() const { | 699 const extensions::Manifest* manifest() const { |
| 702 return manifest_.get(); | 700 return manifest_.get(); |
| 703 } | 701 } |
| 704 const std::string default_locale() const { return default_locale_; } | 702 const std::string default_locale() const { return default_locale_; } |
| 705 bool incognito_split_mode() const { return incognito_split_mode_; } | 703 bool incognito_split_mode() const { return incognito_split_mode_; } |
| 706 bool offline_enabled() const { return offline_enabled_; } | 704 bool offline_enabled() const { return offline_enabled_; } |
| 707 const OAuth2Info& oauth2_info() const { return oauth2_info_; } | 705 const OAuth2Info& oauth2_info() const { return oauth2_info_; } |
| 708 bool wants_file_access() const { return wants_file_access_; } | 706 bool wants_file_access() const { return wants_file_access_; } |
| 709 int creation_flags() const { return creation_flags_; } | 707 int creation_flags() const { return creation_flags_; } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 const char* list_error, | 827 const char* list_error, |
| 830 const char* value_error, | 828 const char* value_error, |
| 831 string16* error); | 829 string16* error); |
| 832 bool LoadLaunchContainer(string16* error); | 830 bool LoadLaunchContainer(string16* error); |
| 833 bool LoadLaunchURL(string16* error); | 831 bool LoadLaunchURL(string16* error); |
| 834 | 832 |
| 835 bool LoadSharedFeatures(const APIPermissionSet& api_permissions, | 833 bool LoadSharedFeatures(const APIPermissionSet& api_permissions, |
| 836 string16* error); | 834 string16* error); |
| 837 bool LoadDescription(string16* error); | 835 bool LoadDescription(string16* error); |
| 838 bool LoadManifestVersion(string16* error); | 836 bool LoadManifestVersion(string16* error); |
| 839 bool LoadUpdateURL(string16* error); | |
| 840 bool LoadIcons(string16* error); | 837 bool LoadIcons(string16* error); |
| 841 bool LoadCommands(string16* error); | 838 bool LoadCommands(string16* error); |
| 842 bool LoadPlugins(string16* error); | 839 bool LoadPlugins(string16* error); |
| 843 bool LoadNaClModules(string16* error); | 840 bool LoadNaClModules(string16* error); |
| 844 bool LoadWebAccessibleResources(string16* error); | 841 bool LoadWebAccessibleResources(string16* error); |
| 845 bool LoadSandboxedPages(string16* error); | 842 bool LoadSandboxedPages(string16* error); |
| 846 // Must be called after LoadPlugins(). | 843 // Must be called after LoadPlugins(). |
| 847 bool LoadRequirements(string16* error); | 844 bool LoadRequirements(string16* error); |
| 848 bool LoadDefaultLocale(string16* error); | 845 bool LoadDefaultLocale(string16* error); |
| 849 bool LoadOfflineEnabled(string16* error); | 846 bool LoadOfflineEnabled(string16* error); |
| 850 bool LoadOptionsPage(string16* error); | |
| 851 bool LoadBackgroundScripts(string16* error); | 847 bool LoadBackgroundScripts(string16* error); |
| 852 bool LoadBackgroundScripts(const std::string& key, string16* error); | 848 bool LoadBackgroundScripts(const std::string& key, string16* error); |
| 853 bool LoadBackgroundPage(const APIPermissionSet& api_permissions, | 849 bool LoadBackgroundPage(const APIPermissionSet& api_permissions, |
| 854 string16* error); | 850 string16* error); |
| 855 bool LoadBackgroundPage(const std::string& key, | 851 bool LoadBackgroundPage(const std::string& key, |
| 856 const APIPermissionSet& api_permissions, | 852 const APIPermissionSet& api_permissions, |
| 857 string16* error); | 853 string16* error); |
| 858 bool LoadBackgroundPersistent( | 854 bool LoadBackgroundPersistent( |
| 859 const APIPermissionSet& api_permissions, | 855 const APIPermissionSet& api_permissions, |
| 860 string16* error); | 856 string16* error); |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 // True if the background page should stay loaded forever; false if it should | 1064 // True if the background page should stay loaded forever; false if it should |
| 1069 // load on-demand (when it needs to handle an event). Defaults to true. | 1065 // load on-demand (when it needs to handle an event). Defaults to true. |
| 1070 bool background_page_is_persistent_; | 1066 bool background_page_is_persistent_; |
| 1071 | 1067 |
| 1072 // True if the background page can be scripted by pages of the app or | 1068 // True if the background page can be scripted by pages of the app or |
| 1073 // extension, in which case all such pages must run in the same process. | 1069 // extension, in which case all such pages must run in the same process. |
| 1074 // False if such pages are not permitted to script the background page, | 1070 // False if such pages are not permitted to script the background page, |
| 1075 // allowing them to run in different processes. | 1071 // allowing them to run in different processes. |
| 1076 bool allow_background_js_access_; | 1072 bool allow_background_js_access_; |
| 1077 | 1073 |
| 1078 // Optional URL to a page for setting options/preferences. | |
| 1079 GURL options_url_; | |
| 1080 | |
| 1081 // URL to the webstore page of the extension. | 1074 // URL to the webstore page of the extension. |
| 1082 GURL details_url_; | 1075 GURL details_url_; |
| 1083 | 1076 |
| 1084 // The public key used to sign the contents of the crx package. | 1077 // The public key used to sign the contents of the crx package. |
| 1085 std::string public_key_; | 1078 std::string public_key_; |
| 1086 | 1079 |
| 1087 // A map of resource id's to relative file paths. | 1080 // A map of resource id's to relative file paths. |
| 1088 scoped_ptr<base::DictionaryValue> theme_images_; | 1081 scoped_ptr<base::DictionaryValue> theme_images_; |
| 1089 | 1082 |
| 1090 // A map of color names to colors. | 1083 // A map of color names to colors. |
| 1091 scoped_ptr<base::DictionaryValue> theme_colors_; | 1084 scoped_ptr<base::DictionaryValue> theme_colors_; |
| 1092 | 1085 |
| 1093 // A map of color names to colors. | 1086 // A map of color names to colors. |
| 1094 scoped_ptr<base::DictionaryValue> theme_tints_; | 1087 scoped_ptr<base::DictionaryValue> theme_tints_; |
| 1095 | 1088 |
| 1096 // A map of display properties. | 1089 // A map of display properties. |
| 1097 scoped_ptr<base::DictionaryValue> theme_display_properties_; | 1090 scoped_ptr<base::DictionaryValue> theme_display_properties_; |
| 1098 | 1091 |
| 1099 // A file containing a list of sites for Managed Mode. | 1092 // A file containing a list of sites for Managed Mode. |
| 1100 FilePath content_pack_site_list_; | 1093 FilePath content_pack_site_list_; |
| 1101 | 1094 |
| 1102 // URL for fetching an update manifest | |
| 1103 GURL update_url_; | |
| 1104 | |
| 1105 // The manifest from which this extension was created. | 1095 // The manifest from which this extension was created. |
| 1106 scoped_ptr<Manifest> manifest_; | 1096 scoped_ptr<Manifest> manifest_; |
| 1107 | 1097 |
| 1108 // Stored parsed manifest data. | 1098 // Stored parsed manifest data. |
| 1109 ManifestDataMap manifest_data_; | 1099 ManifestDataMap manifest_data_; |
| 1110 | 1100 |
| 1111 // Set to true at the end of InitValue when initialization is finished. | 1101 // Set to true at the end of InitValue when initialization is finished. |
| 1112 bool finished_parsing_manifest_; | 1102 bool finished_parsing_manifest_; |
| 1113 | 1103 |
| 1114 // Whether this extension requests isolated storage. | 1104 // Whether this extension requests isolated storage. |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 | 1208 |
| 1219 UpdatedExtensionPermissionsInfo( | 1209 UpdatedExtensionPermissionsInfo( |
| 1220 const Extension* extension, | 1210 const Extension* extension, |
| 1221 const PermissionSet* permissions, | 1211 const PermissionSet* permissions, |
| 1222 Reason reason); | 1212 Reason reason); |
| 1223 }; | 1213 }; |
| 1224 | 1214 |
| 1225 } // namespace extensions | 1215 } // namespace extensions |
| 1226 | 1216 |
| 1227 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1217 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |