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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 const URLPatternSet& web_extent() const { return extent_; } | 669 const URLPatternSet& web_extent() const { return extent_; } |
670 const std::string& launch_local_path() const { return launch_local_path_; } | 670 const std::string& launch_local_path() const { return launch_local_path_; } |
671 const std::string& launch_web_url() const { return launch_web_url_; } | 671 const std::string& launch_web_url() const { return launch_web_url_; } |
672 extension_misc::LaunchContainer launch_container() const { | 672 extension_misc::LaunchContainer launch_container() const { |
673 return launch_container_; | 673 return launch_container_; |
674 } | 674 } |
675 int launch_width() const { return launch_width_; } | 675 int launch_width() const { return launch_width_; } |
676 int launch_height() const { return launch_height_; } | 676 int launch_height() const { return launch_height_; } |
677 | 677 |
678 // Theme-related. | 678 // Theme-related. |
679 bool is_theme() const; | 679 bool is_theme() const; |
Devlin
2013/01/30 02:56:40
Do we want to keep this in the Extension class? We
Joe Thomas
2013/01/30 18:15:39
Since this is a function which returns the basic t
Yoyo Zhou
2013/01/30 22:11:06
This is a property of the manifest rather than the
| |
680 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); } | |
681 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } | |
682 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } | |
683 base::DictionaryValue* GetThemeDisplayProperties() const { | |
684 return theme_display_properties_.get(); | |
685 } | |
686 | 680 |
687 // Content Security Policy! | 681 // Content Security Policy! |
688 const std::string& content_security_policy() const { | 682 const std::string& content_security_policy() const { |
689 return content_security_policy_; | 683 return content_security_policy_; |
690 } | 684 } |
691 | 685 |
692 // Content pack related. | 686 // Content pack related. |
693 bool is_content_pack() const; | 687 bool is_content_pack() const; |
694 ExtensionResource GetContentPackSiteList() const; | 688 ExtensionResource GetContentPackSiteList() const; |
695 | 689 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
802 string16* error); | 796 string16* error); |
803 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, | 797 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, |
804 string16* error); | 798 string16* error); |
805 bool LoadContentScripts(string16* error); | 799 bool LoadContentScripts(string16* error); |
806 bool LoadPageAction(string16* error); | 800 bool LoadPageAction(string16* error); |
807 bool LoadBrowserAction(string16* error); | 801 bool LoadBrowserAction(string16* error); |
808 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); | 802 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); |
809 bool LoadTextToSpeechVoices(string16* error); | 803 bool LoadTextToSpeechVoices(string16* error); |
810 bool LoadIncognitoMode(string16* error); | 804 bool LoadIncognitoMode(string16* error); |
811 bool LoadContentSecurityPolicy(string16* error); | 805 bool LoadContentSecurityPolicy(string16* error); |
812 | |
813 bool LoadThemeFeatures(string16* error); | |
814 bool LoadThemeImages(const base::DictionaryValue* theme_value, | |
815 string16* error); | |
816 bool LoadThemeColors(const base::DictionaryValue* theme_value, | |
817 string16* error); | |
818 bool LoadThemeTints(const base::DictionaryValue* theme_value, | |
819 string16* error); | |
820 bool LoadThemeDisplayProperties(const base::DictionaryValue* theme_value, | |
821 string16* error); | |
822 | |
823 bool LoadManagedModeFeatures(string16* error); | 806 bool LoadManagedModeFeatures(string16* error); |
824 bool LoadManagedModeSites( | 807 bool LoadManagedModeSites( |
825 const base::DictionaryValue* content_pack_value, | 808 const base::DictionaryValue* content_pack_value, |
826 string16* error); | 809 string16* error); |
827 bool LoadManagedModeConfigurations( | 810 bool LoadManagedModeConfigurations( |
828 const base::DictionaryValue* content_pack_value, | 811 const base::DictionaryValue* content_pack_value, |
829 string16* error); | 812 string16* error); |
830 | 813 |
831 // Helper function for implementing HasCachedImage/GetCachedImage. A return | 814 // Helper function for implementing HasCachedImage/GetCachedImage. A return |
832 // value of NULL means there is no matching image cached (we allow caching an | 815 // value of NULL means there is no matching image cached (we allow caching an |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
986 | 969 |
987 // True if the background page can be scripted by pages of the app or | 970 // True if the background page can be scripted by pages of the app or |
988 // extension, in which case all such pages must run in the same process. | 971 // extension, in which case all such pages must run in the same process. |
989 // False if such pages are not permitted to script the background page, | 972 // False if such pages are not permitted to script the background page, |
990 // allowing them to run in different processes. | 973 // allowing them to run in different processes. |
991 bool allow_background_js_access_; | 974 bool allow_background_js_access_; |
992 | 975 |
993 // The public key used to sign the contents of the crx package. | 976 // The public key used to sign the contents of the crx package. |
994 std::string public_key_; | 977 std::string public_key_; |
995 | 978 |
996 // A map of resource id's to relative file paths. | |
997 scoped_ptr<base::DictionaryValue> theme_images_; | |
998 | |
999 // A map of color names to colors. | |
1000 scoped_ptr<base::DictionaryValue> theme_colors_; | |
1001 | |
1002 // A map of color names to colors. | |
1003 scoped_ptr<base::DictionaryValue> theme_tints_; | |
1004 | |
1005 // A map of display properties. | |
1006 scoped_ptr<base::DictionaryValue> theme_display_properties_; | |
1007 | |
1008 // A file containing a list of sites for Managed Mode. | 979 // A file containing a list of sites for Managed Mode. |
1009 FilePath content_pack_site_list_; | 980 FilePath content_pack_site_list_; |
1010 | 981 |
1011 // The manifest from which this extension was created. | 982 // The manifest from which this extension was created. |
1012 scoped_ptr<Manifest> manifest_; | 983 scoped_ptr<Manifest> manifest_; |
1013 | 984 |
1014 // Stored parsed manifest data. | 985 // Stored parsed manifest data. |
1015 ManifestDataMap manifest_data_; | 986 ManifestDataMap manifest_data_; |
1016 | 987 |
1017 // Set to true at the end of InitValue when initialization is finished. | 988 // 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... | |
1129 | 1100 |
1130 UpdatedExtensionPermissionsInfo( | 1101 UpdatedExtensionPermissionsInfo( |
1131 const Extension* extension, | 1102 const Extension* extension, |
1132 const PermissionSet* permissions, | 1103 const PermissionSet* permissions, |
1133 Reason reason); | 1104 Reason reason); |
1134 }; | 1105 }; |
1135 | 1106 |
1136 } // namespace extensions | 1107 } // namespace extensions |
1137 | 1108 |
1138 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1109 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |