Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: chrome/common/extensions/extension.h

Issue 12042096: Move page action manifest parsing out of Extension; the first multi-key manifest handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // Base64-encoded version of the key used to sign this extension. 599 // Base64-encoded version of the key used to sign this extension.
600 // In pseudocode, returns 600 // In pseudocode, returns
601 // base::Base64Encode(RSAPrivateKey(pem_file).ExportPublicKey()). 601 // base::Base64Encode(RSAPrivateKey(pem_file).ExportPublicKey()).
602 const std::string& public_key() const { return public_key_; } 602 const std::string& public_key() const { return public_key_; }
603 const std::string& description() const { return description_; } 603 const std::string& description() const { return description_; }
604 int manifest_version() const { return manifest_version_; } 604 int manifest_version() const { return manifest_version_; }
605 bool converted_from_user_script() const { 605 bool converted_from_user_script() const {
606 return converted_from_user_script_; 606 return converted_from_user_script_;
607 } 607 }
608 const UserScriptList& content_scripts() const { return content_scripts_; } 608 const UserScriptList& content_scripts() const { return content_scripts_; }
609 const ActionInfo* page_action_info() const { return page_action_info_.get(); }
610 const ActionInfo* browser_action_info() const { 609 const ActionInfo* browser_action_info() const {
611 return browser_action_info_.get(); 610 return browser_action_info_.get();
612 } 611 }
613 const ActionInfo* system_indicator_info() const { 612 const ActionInfo* system_indicator_info() const {
614 return system_indicator_info_.get(); 613 return system_indicator_info_.get();
615 } 614 }
616 const std::vector<PluginInfo>& plugins() const { return plugins_; } 615 const std::vector<PluginInfo>& plugins() const { return plugins_; }
617 const std::vector<NaClModuleInfo>& nacl_modules() const { 616 const std::vector<NaClModuleInfo>& nacl_modules() const {
618 return nacl_modules_; 617 return nacl_modules_;
619 } 618 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 bool LoadBackgroundPersistent( 825 bool LoadBackgroundPersistent(
827 const APIPermissionSet& api_permissions, 826 const APIPermissionSet& api_permissions,
828 string16* error); 827 string16* error);
829 bool LoadBackgroundAllowJSAccess( 828 bool LoadBackgroundAllowJSAccess(
830 const APIPermissionSet& api_permissions, 829 const APIPermissionSet& api_permissions,
831 string16* error); 830 string16* error);
832 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, 831 bool LoadExtensionFeatures(APIPermissionSet* api_permissions,
833 string16* error); 832 string16* error);
834 bool LoadManifestHandlerFeatures(string16* error); 833 bool LoadManifestHandlerFeatures(string16* error);
835 bool LoadContentScripts(string16* error); 834 bool LoadContentScripts(string16* error);
836 bool LoadPageAction(string16* error);
837 bool LoadBrowserAction(string16* error); 835 bool LoadBrowserAction(string16* error);
838 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); 836 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error);
839 bool LoadTextToSpeechVoices(string16* error); 837 bool LoadTextToSpeechVoices(string16* error);
840 bool LoadIncognitoMode(string16* error); 838 bool LoadIncognitoMode(string16* error);
841 bool LoadContentSecurityPolicy(string16* error); 839 bool LoadContentSecurityPolicy(string16* error);
842 840
843 bool LoadThemeFeatures(string16* error); 841 bool LoadThemeFeatures(string16* error);
844 bool LoadThemeImages(const base::DictionaryValue* theme_value, 842 bool LoadThemeImages(const base::DictionaryValue* theme_value,
845 string16* error); 843 string16* error);
846 bool LoadThemeColors(const base::DictionaryValue* theme_value, 844 bool LoadThemeColors(const base::DictionaryValue* theme_value,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 // An optional longer description of the extension. 972 // An optional longer description of the extension.
975 std::string description_; 973 std::string description_;
976 974
977 // True if the extension was generated from a user script. (We show slightly 975 // True if the extension was generated from a user script. (We show slightly
978 // different UI if so). 976 // different UI if so).
979 bool converted_from_user_script_; 977 bool converted_from_user_script_;
980 978
981 // Paths to the content scripts the extension contains. 979 // Paths to the content scripts the extension contains.
982 UserScriptList content_scripts_; 980 UserScriptList content_scripts_;
983 981
984 // The extension's page action, if any.
985 scoped_ptr<ActionInfo> page_action_info_;
986
987 // The extension's browser action, if any. 982 // The extension's browser action, if any.
988 scoped_ptr<ActionInfo> browser_action_info_; 983 scoped_ptr<ActionInfo> browser_action_info_;
989 984
990 // The extension's system indicator, if any. 985 // The extension's system indicator, if any.
991 scoped_ptr<ActionInfo> system_indicator_info_; 986 scoped_ptr<ActionInfo> system_indicator_info_;
992 987
993 // Optional list of NPAPI plugins and associated properties. 988 // Optional list of NPAPI plugins and associated properties.
994 std::vector<PluginInfo> plugins_; 989 std::vector<PluginInfo> plugins_;
995 990
996 // Optional list of NaCl modules and associated properties. 991 // Optional list of NaCl modules and associated properties.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 bool wants_file_access_; 1093 bool wants_file_access_;
1099 1094
1100 // The flags that were passed to InitFromValue. 1095 // The flags that were passed to InitFromValue.
1101 int creation_flags_; 1096 int creation_flags_;
1102 1097
1103 // The Content-Security-Policy for this extension. Extensions can use 1098 // The Content-Security-Policy for this extension. Extensions can use
1104 // Content-Security-Policies to mitigate cross-site scripting and other 1099 // Content-Security-Policies to mitigate cross-site scripting and other
1105 // vulnerabilities. 1100 // vulnerabilities.
1106 std::string content_security_policy_; 1101 std::string content_security_policy_;
1107 1102
1108 FRIEND_TEST_ALL_PREFIXES(ExtensionTest, LoadPageActionHelper);
1109 FRIEND_TEST_ALL_PREFIXES(::TabStripModelTest, Apps); 1103 FRIEND_TEST_ALL_PREFIXES(::TabStripModelTest, Apps);
1110 1104
1111 DISALLOW_COPY_AND_ASSIGN(Extension); 1105 DISALLOW_COPY_AND_ASSIGN(Extension);
1112 }; 1106 };
1113 1107
1114 typedef std::vector< scoped_refptr<const Extension> > ExtensionList; 1108 typedef std::vector< scoped_refptr<const Extension> > ExtensionList;
1115 typedef std::set<std::string> ExtensionIdSet; 1109 typedef std::set<std::string> ExtensionIdSet;
1116 typedef std::vector<std::string> ExtensionIdList; 1110 typedef std::vector<std::string> ExtensionIdList;
1117 1111
1118 // Let gtest print InstallWarnings. 1112 // Let gtest print InstallWarnings.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 1162
1169 UpdatedExtensionPermissionsInfo( 1163 UpdatedExtensionPermissionsInfo(
1170 const Extension* extension, 1164 const Extension* extension,
1171 const PermissionSet* permissions, 1165 const PermissionSet* permissions,
1172 Reason reason); 1166 Reason reason);
1173 }; 1167 };
1174 1168
1175 } // namespace extensions 1169 } // namespace extensions
1176 1170
1177 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1171 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698