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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 const std::string& launch_local_path() const { return launch_local_path_; } | 577 const std::string& launch_local_path() const { return launch_local_path_; } |
578 const std::string& launch_web_url() const { return launch_web_url_; } | 578 const std::string& launch_web_url() const { return launch_web_url_; } |
579 extension_misc::LaunchContainer launch_container() const { | 579 extension_misc::LaunchContainer launch_container() const { |
580 return launch_container_; | 580 return launch_container_; |
581 } | 581 } |
582 int launch_width() const { return launch_width_; } | 582 int launch_width() const { return launch_width_; } |
583 int launch_height() const { return launch_height_; } | 583 int launch_height() const { return launch_height_; } |
584 | 584 |
585 // Theme-related. | 585 // Theme-related. |
586 bool is_theme() const; | 586 bool is_theme() const; |
587 base::DictionaryValue* GetThemeImages() const { return theme_images_.get(); } | |
588 base::DictionaryValue* GetThemeColors() const {return theme_colors_.get(); } | |
589 base::DictionaryValue* GetThemeTints() const { return theme_tints_.get(); } | |
590 base::DictionaryValue* GetThemeDisplayProperties() const { | |
591 return theme_display_properties_.get(); | |
592 } | |
593 | 587 |
594 // Content Security Policy! | 588 // Content Security Policy! |
595 const std::string& content_security_policy() const { | 589 const std::string& content_security_policy() const { |
596 return content_security_policy_; | 590 return content_security_policy_; |
597 } | 591 } |
598 | 592 |
599 // Content pack related. | 593 // Content pack related. |
600 bool is_content_pack() const; | 594 bool is_content_pack() const; |
601 ExtensionResource GetContentPackSiteList() const; | 595 ExtensionResource GetContentPackSiteList() const; |
602 | 596 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 string16* error); | 703 string16* error); |
710 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, | 704 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, |
711 string16* error); | 705 string16* error); |
712 bool LoadContentScripts(string16* error); | 706 bool LoadContentScripts(string16* error); |
713 bool LoadPageAction(string16* error); | 707 bool LoadPageAction(string16* error); |
714 bool LoadBrowserAction(string16* error); | 708 bool LoadBrowserAction(string16* error); |
715 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); | 709 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); |
716 bool LoadTextToSpeechVoices(string16* error); | 710 bool LoadTextToSpeechVoices(string16* error); |
717 bool LoadIncognitoMode(string16* error); | 711 bool LoadIncognitoMode(string16* error); |
718 bool LoadContentSecurityPolicy(string16* error); | 712 bool LoadContentSecurityPolicy(string16* error); |
719 | |
720 bool LoadThemeFeatures(string16* error); | |
721 bool LoadThemeImages(const base::DictionaryValue* theme_value, | |
722 string16* error); | |
723 bool LoadThemeColors(const base::DictionaryValue* theme_value, | |
724 string16* error); | |
725 bool LoadThemeTints(const base::DictionaryValue* theme_value, | |
726 string16* error); | |
727 bool LoadThemeDisplayProperties(const base::DictionaryValue* theme_value, | |
728 string16* error); | |
729 | |
730 bool LoadManagedModeFeatures(string16* error); | 713 bool LoadManagedModeFeatures(string16* error); |
731 bool LoadManagedModeSites( | 714 bool LoadManagedModeSites( |
732 const base::DictionaryValue* content_pack_value, | 715 const base::DictionaryValue* content_pack_value, |
733 string16* error); | 716 string16* error); |
734 bool LoadManagedModeConfigurations( | 717 bool LoadManagedModeConfigurations( |
735 const base::DictionaryValue* content_pack_value, | 718 const base::DictionaryValue* content_pack_value, |
736 string16* error); | 719 string16* error); |
737 | 720 |
738 // Helper function for implementing HasCachedImage/GetCachedImage. A return | 721 // Helper function for implementing HasCachedImage/GetCachedImage. A return |
739 // value of NULL means there is no matching image cached (we allow caching an | 722 // value of NULL means there is no matching image cached (we allow caching an |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 | 870 |
888 // True if the background page can be scripted by pages of the app or | 871 // True if the background page can be scripted by pages of the app or |
889 // extension, in which case all such pages must run in the same process. | 872 // extension, in which case all such pages must run in the same process. |
890 // False if such pages are not permitted to script the background page, | 873 // False if such pages are not permitted to script the background page, |
891 // allowing them to run in different processes. | 874 // allowing them to run in different processes. |
892 bool allow_background_js_access_; | 875 bool allow_background_js_access_; |
893 | 876 |
894 // The public key used to sign the contents of the crx package. | 877 // The public key used to sign the contents of the crx package. |
895 std::string public_key_; | 878 std::string public_key_; |
896 | 879 |
897 // A map of resource id's to relative file paths. | |
898 scoped_ptr<base::DictionaryValue> theme_images_; | |
899 | |
900 // A map of color names to colors. | |
901 scoped_ptr<base::DictionaryValue> theme_colors_; | |
902 | |
903 // A map of color names to colors. | |
904 scoped_ptr<base::DictionaryValue> theme_tints_; | |
905 | |
906 // A map of display properties. | |
907 scoped_ptr<base::DictionaryValue> theme_display_properties_; | |
908 | |
909 // A file containing a list of sites for Managed Mode. | 880 // A file containing a list of sites for Managed Mode. |
910 base::FilePath content_pack_site_list_; | 881 base::FilePath content_pack_site_list_; |
911 | 882 |
912 // The manifest from which this extension was created. | 883 // The manifest from which this extension was created. |
913 scoped_ptr<Manifest> manifest_; | 884 scoped_ptr<Manifest> manifest_; |
914 | 885 |
915 // Stored parsed manifest data. | 886 // Stored parsed manifest data. |
916 ManifestDataMap manifest_data_; | 887 ManifestDataMap manifest_data_; |
917 | 888 |
918 // Set to true at the end of InitValue when initialization is finished. | 889 // Set to true at the end of InitValue when initialization is finished. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 | 995 |
1025 UpdatedExtensionPermissionsInfo( | 996 UpdatedExtensionPermissionsInfo( |
1026 const Extension* extension, | 997 const Extension* extension, |
1027 const PermissionSet* permissions, | 998 const PermissionSet* permissions, |
1028 Reason reason); | 999 Reason reason); |
1029 }; | 1000 }; |
1030 | 1001 |
1031 } // namespace extensions | 1002 } // namespace extensions |
1032 | 1003 |
1033 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1004 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |