OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 const std::string& launch_local_path() const { return launch_local_path_; } | 699 const std::string& launch_local_path() const { return launch_local_path_; } |
700 const std::string& launch_web_url() const { return launch_web_url_; } | 700 const std::string& launch_web_url() const { return launch_web_url_; } |
701 extension_misc::LaunchContainer launch_container() const { | 701 extension_misc::LaunchContainer launch_container() const { |
702 return launch_container_; | 702 return launch_container_; |
703 } | 703 } |
704 int launch_width() const { return launch_width_; } | 704 int launch_width() const { return launch_width_; } |
705 int launch_height() const { return launch_height_; } | 705 int launch_height() const { return launch_height_; } |
706 | 706 |
707 // Theme-related. | 707 // Theme-related. |
708 bool is_theme() const; | 708 bool is_theme() const; |
709 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); } | |
710 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } | |
711 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } | |
712 base::DictionaryValue* GetThemeDisplayProperties() const { | |
713 return theme_display_properties_.get(); | |
714 } | |
715 | 709 |
716 // Content Security Policy! | 710 // Content Security Policy! |
717 const std::string& content_security_policy() const { | 711 const std::string& content_security_policy() const { |
718 return content_security_policy_; | 712 return content_security_policy_; |
719 } | 713 } |
720 | 714 |
721 // Content pack related. | 715 // Content pack related. |
722 ExtensionResource GetContentPackSiteList() const; | 716 ExtensionResource GetContentPackSiteList() const; |
723 | 717 |
724 GURL GetBackgroundURL() const; | 718 GURL GetBackgroundURL() const; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, | 826 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, |
833 string16* error); | 827 string16* error); |
834 bool LoadManifestHandlerFeatures(string16* error); | 828 bool LoadManifestHandlerFeatures(string16* error); |
835 bool LoadContentScripts(string16* error); | 829 bool LoadContentScripts(string16* error); |
836 bool LoadPageAction(string16* error); | 830 bool LoadPageAction(string16* error); |
837 bool LoadBrowserAction(string16* error); | 831 bool LoadBrowserAction(string16* error); |
838 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); | 832 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); |
839 bool LoadTextToSpeechVoices(string16* error); | 833 bool LoadTextToSpeechVoices(string16* error); |
840 bool LoadIncognitoMode(string16* error); | 834 bool LoadIncognitoMode(string16* error); |
841 bool LoadContentSecurityPolicy(string16* error); | 835 bool LoadContentSecurityPolicy(string16* error); |
842 | |
843 bool LoadThemeFeatures(string16* error); | |
844 bool LoadThemeImages(const base::DictionaryValue* theme_value, | |
845 string16* error); | |
846 bool LoadThemeColors(const base::DictionaryValue* theme_value, | |
847 string16* error); | |
848 bool LoadThemeTints(const base::DictionaryValue* theme_value, | |
849 string16* error); | |
850 bool LoadThemeDisplayProperties(const base::DictionaryValue* theme_value, | |
851 string16* error); | |
852 | |
853 bool LoadManagedModeFeatures(string16* error); | 836 bool LoadManagedModeFeatures(string16* error); |
854 bool LoadManagedModeSites( | 837 bool LoadManagedModeSites( |
855 const base::DictionaryValue* content_pack_value, | 838 const base::DictionaryValue* content_pack_value, |
856 string16* error); | 839 string16* error); |
857 bool LoadManagedModeConfigurations( | 840 bool LoadManagedModeConfigurations( |
858 const base::DictionaryValue* content_pack_value, | 841 const base::DictionaryValue* content_pack_value, |
859 string16* error); | 842 string16* error); |
860 | 843 |
861 // Helper function for implementing HasCachedImage/GetCachedImage. A return | 844 // Helper function for implementing HasCachedImage/GetCachedImage. A return |
862 // value of NULL means there is no matching image cached (we allow caching an | 845 // value of NULL means there is no matching image cached (we allow caching an |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 | 1008 |
1026 // True if the background page can be scripted by pages of the app or | 1009 // True if the background page can be scripted by pages of the app or |
1027 // extension, in which case all such pages must run in the same process. | 1010 // extension, in which case all such pages must run in the same process. |
1028 // False if such pages are not permitted to script the background page, | 1011 // False if such pages are not permitted to script the background page, |
1029 // allowing them to run in different processes. | 1012 // allowing them to run in different processes. |
1030 bool allow_background_js_access_; | 1013 bool allow_background_js_access_; |
1031 | 1014 |
1032 // The public key used to sign the contents of the crx package. | 1015 // The public key used to sign the contents of the crx package. |
1033 std::string public_key_; | 1016 std::string public_key_; |
1034 | 1017 |
1035 // A map of resource id's to relative file paths. | |
1036 scoped_ptr<base::DictionaryValue> theme_images_; | |
1037 | |
1038 // A map of color names to colors. | |
1039 scoped_ptr<base::DictionaryValue> theme_colors_; | |
1040 | |
1041 // A map of color names to colors. | |
1042 scoped_ptr<base::DictionaryValue> theme_tints_; | |
1043 | |
1044 // A map of display properties. | |
1045 scoped_ptr<base::DictionaryValue> theme_display_properties_; | |
1046 | |
1047 // A file containing a list of sites for Managed Mode. | 1018 // A file containing a list of sites for Managed Mode. |
1048 FilePath content_pack_site_list_; | 1019 FilePath content_pack_site_list_; |
1049 | 1020 |
1050 // The manifest from which this extension was created. | 1021 // The manifest from which this extension was created. |
1051 scoped_ptr<Manifest> manifest_; | 1022 scoped_ptr<Manifest> manifest_; |
1052 | 1023 |
1053 // Stored parsed manifest data. | 1024 // Stored parsed manifest data. |
1054 ManifestDataMap manifest_data_; | 1025 ManifestDataMap manifest_data_; |
1055 | 1026 |
1056 // Set to true at the end of InitValue when initialization is finished. | 1027 // Set to true at the end of InitValue when initialization is finished. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 | 1139 |
1169 UpdatedExtensionPermissionsInfo( | 1140 UpdatedExtensionPermissionsInfo( |
1170 const Extension* extension, | 1141 const Extension* extension, |
1171 const PermissionSet* permissions, | 1142 const PermissionSet* permissions, |
1172 Reason reason); | 1143 Reason reason); |
1173 }; | 1144 }; |
1174 | 1145 |
1175 } // namespace extensions | 1146 } // namespace extensions |
1176 | 1147 |
1177 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1148 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |