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

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

Issue 11624036: Move the parsing of homepage_url" and "devtools_page" out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: patch-rebased- 2 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
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 514
515 // Sets the active |permissions|. 515 // Sets the active |permissions|.
516 void SetActivePermissions(const PermissionSet* permissions) const; 516 void SetActivePermissions(const PermissionSet* permissions) const;
517 517
518 // Gets the extension's active permission set. 518 // Gets the extension's active permission set.
519 scoped_refptr<const PermissionSet> GetActivePermissions() const; 519 scoped_refptr<const PermissionSet> GetActivePermissions() const;
520 520
521 // Whether context menu should be shown for page and browser actions. 521 // Whether context menu should be shown for page and browser actions.
522 bool ShowConfigureContextMenus() const; 522 bool ShowConfigureContextMenus() const;
523 523
524 // Returns the Homepage URL for this extension. If homepage_url was not
525 // specified in the manifest, this returns the Google Gallery URL. For
526 // third-party extensions, this returns a blank GURL.
527 GURL GetHomepageURL() const;
528
529 // Returns a list of paths (relative to the extension dir) for images that 524 // Returns a list of paths (relative to the extension dir) for images that
530 // the browser might load (like themes and page action icons). 525 // the browser might load (like themes and page action icons).
531 std::set<FilePath> GetBrowserImages() const; 526 std::set<FilePath> GetBrowserImages() const;
532 527
533 // Get an extension icon as a resource or URL. 528 // Get an extension icon as a resource or URL.
534 ExtensionResource GetIconResource( 529 ExtensionResource GetIconResource(
535 int size, ExtensionIconSet::MatchType match_type) const; 530 int size, ExtensionIconSet::MatchType match_type) const;
536 GURL GetIconURL(int size, ExtensionIconSet::MatchType match_type) const; 531 GURL GetIconURL(int size, ExtensionIconSet::MatchType match_type) const;
537 532
538 // Gets the fully resolved absolute launch URL. 533 // Gets the fully resolved absolute launch URL.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 const std::vector<std::string>& background_scripts() const { 691 const std::vector<std::string>& background_scripts() const {
697 return background_scripts_; 692 return background_scripts_;
698 } 693 }
699 bool has_persistent_background_page() const { 694 bool has_persistent_background_page() const {
700 return has_background_page() && background_page_is_persistent_; 695 return has_background_page() && background_page_is_persistent_;
701 } 696 }
702 bool has_lazy_background_page() const { 697 bool has_lazy_background_page() const {
703 return has_background_page() && !background_page_is_persistent_; 698 return has_background_page() && !background_page_is_persistent_;
704 } 699 }
705 const GURL& options_url() const { return options_url_; } 700 const GURL& options_url() const { return options_url_; }
706 const GURL& devtools_url() const { return devtools_url_; }
707 const GURL& details_url() const { return details_url_;} 701 const GURL& details_url() const { return details_url_;}
708 const PermissionSet* optional_permission_set() const { 702 const PermissionSet* optional_permission_set() const {
709 return optional_permission_set_.get(); 703 return optional_permission_set_.get();
710 } 704 }
711 const PermissionSet* required_permission_set() const { 705 const PermissionSet* required_permission_set() const {
712 return required_permission_set_.get(); 706 return required_permission_set_.get();
713 } 707 }
714 // Appends |new_warnings| to install_warnings(). 708 // Appends |new_warnings| to install_warnings().
715 void AddInstallWarnings(const InstallWarningVector& new_warnings); 709 void AddInstallWarnings(const InstallWarningVector& new_warnings);
716 const InstallWarningVector& install_warnings() const { 710 const InstallWarningVector& install_warnings() const {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 const char* list_error, 849 const char* list_error,
856 const char* value_error, 850 const char* value_error,
857 string16* error); 851 string16* error);
858 bool LoadLaunchContainer(string16* error); 852 bool LoadLaunchContainer(string16* error);
859 bool LoadLaunchURL(string16* error); 853 bool LoadLaunchURL(string16* error);
860 854
861 bool LoadSharedFeatures(const APIPermissionSet& api_permissions, 855 bool LoadSharedFeatures(const APIPermissionSet& api_permissions,
862 string16* error); 856 string16* error);
863 bool LoadDescription(string16* error); 857 bool LoadDescription(string16* error);
864 bool LoadManifestVersion(string16* error); 858 bool LoadManifestVersion(string16* error);
865 bool LoadHomepageURL(string16* error);
866 bool LoadUpdateURL(string16* error); 859 bool LoadUpdateURL(string16* error);
867 bool LoadIcons(string16* error); 860 bool LoadIcons(string16* error);
868 bool LoadCommands(string16* error); 861 bool LoadCommands(string16* error);
869 bool LoadPlugins(string16* error); 862 bool LoadPlugins(string16* error);
870 bool LoadNaClModules(string16* error); 863 bool LoadNaClModules(string16* error);
871 bool LoadWebAccessibleResources(string16* error); 864 bool LoadWebAccessibleResources(string16* error);
872 bool LoadSandboxedPages(string16* error); 865 bool LoadSandboxedPages(string16* error);
873 // Must be called after LoadPlugins(). 866 // Must be called after LoadPlugins().
874 bool LoadRequirements(string16* error); 867 bool LoadRequirements(string16* error);
875 bool LoadDefaultLocale(string16* error); 868 bool LoadDefaultLocale(string16* error);
(...skipping 12 matching lines...) Expand all
888 bool LoadBackgroundAllowJSAccess( 881 bool LoadBackgroundAllowJSAccess(
889 const APIPermissionSet& api_permissions, 882 const APIPermissionSet& api_permissions,
890 string16* error); 883 string16* error);
891 bool LoadFileHandler(const std::string& handler_id, 884 bool LoadFileHandler(const std::string& handler_id,
892 const base::DictionaryValue& handler_info, 885 const base::DictionaryValue& handler_info,
893 string16* error); 886 string16* error);
894 bool LoadFileHandlers(string16* error); 887 bool LoadFileHandlers(string16* error);
895 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, 888 bool LoadExtensionFeatures(APIPermissionSet* api_permissions,
896 string16* error); 889 string16* error);
897 bool LoadManifestHandlerFeatures(string16* error); 890 bool LoadManifestHandlerFeatures(string16* error);
898 bool LoadDevToolsPage(string16* error);
899 bool LoadContentScripts(string16* error); 891 bool LoadContentScripts(string16* error);
900 bool LoadPageAction(string16* error); 892 bool LoadPageAction(string16* error);
901 bool LoadBrowserAction(string16* error); 893 bool LoadBrowserAction(string16* error);
902 bool LoadScriptBadge(string16* error); 894 bool LoadScriptBadge(string16* error);
903 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); 895 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error);
904 bool LoadChromeURLOverrides(string16* error); 896 bool LoadChromeURLOverrides(string16* error);
905 bool LoadTextToSpeechVoices(string16* error); 897 bool LoadTextToSpeechVoices(string16* error);
906 bool LoadIncognitoMode(string16* error); 898 bool LoadIncognitoMode(string16* error);
907 bool LoadContentSecurityPolicy(string16* error); 899 bool LoadContentSecurityPolicy(string16* error);
908 900
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1096
1105 // True if the background page can be scripted by pages of the app or 1097 // True if the background page can be scripted by pages of the app or
1106 // extension, in which case all such pages must run in the same process. 1098 // extension, in which case all such pages must run in the same process.
1107 // False if such pages are not permitted to script the background page, 1099 // False if such pages are not permitted to script the background page,
1108 // allowing them to run in different processes. 1100 // allowing them to run in different processes.
1109 bool allow_background_js_access_; 1101 bool allow_background_js_access_;
1110 1102
1111 // Optional URL to a page for setting options/preferences. 1103 // Optional URL to a page for setting options/preferences.
1112 GURL options_url_; 1104 GURL options_url_;
1113 1105
1114 // Optional URL to a devtools extension page.
1115 GURL devtools_url_;
1116
1117 // URL to the webstore page of the extension. 1106 // URL to the webstore page of the extension.
1118 GURL details_url_; 1107 GURL details_url_;
1119 1108
1120 // The public key used to sign the contents of the crx package. 1109 // The public key used to sign the contents of the crx package.
1121 std::string public_key_; 1110 std::string public_key_;
1122 1111
1123 // A map of resource id's to relative file paths. 1112 // A map of resource id's to relative file paths.
1124 scoped_ptr<base::DictionaryValue> theme_images_; 1113 scoped_ptr<base::DictionaryValue> theme_images_;
1125 1114
1126 // A map of color names to colors. 1115 // A map of color names to colors.
1127 scoped_ptr<base::DictionaryValue> theme_colors_; 1116 scoped_ptr<base::DictionaryValue> theme_colors_;
1128 1117
1129 // A map of color names to colors. 1118 // A map of color names to colors.
1130 scoped_ptr<base::DictionaryValue> theme_tints_; 1119 scoped_ptr<base::DictionaryValue> theme_tints_;
1131 1120
1132 // A map of display properties. 1121 // A map of display properties.
1133 scoped_ptr<base::DictionaryValue> theme_display_properties_; 1122 scoped_ptr<base::DictionaryValue> theme_display_properties_;
1134 1123
1135 // A file containing a list of sites for Managed Mode. 1124 // A file containing a list of sites for Managed Mode.
1136 FilePath content_pack_site_list_; 1125 FilePath content_pack_site_list_;
1137 1126
1138 // The homepage for this extension. Useful if it is not hosted by Google and
1139 // therefore does not have a Gallery URL.
1140 GURL homepage_url_;
1141
1142 // URL for fetching an update manifest 1127 // URL for fetching an update manifest
1143 GURL update_url_; 1128 GURL update_url_;
1144 1129
1145 // The manifest from which this extension was created. 1130 // The manifest from which this extension was created.
1146 scoped_ptr<Manifest> manifest_; 1131 scoped_ptr<Manifest> manifest_;
1147 1132
1148 // Stored parsed manifest data. 1133 // Stored parsed manifest data.
1149 ManifestDataMap manifest_data_; 1134 ManifestDataMap manifest_data_;
1150 1135
1151 // Set to true at the end of InitValue when initialization is finished. 1136 // Set to true at the end of InitValue when initialization is finished.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 1250
1266 UpdatedExtensionPermissionsInfo( 1251 UpdatedExtensionPermissionsInfo(
1267 const Extension* extension, 1252 const Extension* extension,
1268 const PermissionSet* permissions, 1253 const PermissionSet* permissions,
1269 Reason reason); 1254 Reason reason);
1270 }; 1255 };
1271 1256
1272 } // namespace extensions 1257 } // namespace extensions
1273 1258
1274 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1259 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698