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

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

Issue 10217016: Event page rebranding: "transient" key is now "persistent" again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('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 #pragma once 7 #pragma once
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 596 }
597 bool has_background_page() const { 597 bool has_background_page() const {
598 return background_url_.is_valid() || !background_scripts_.empty(); 598 return background_url_.is_valid() || !background_scripts_.empty();
599 } 599 }
600 bool allow_background_js_access() const { 600 bool allow_background_js_access() const {
601 return allow_background_js_access_; 601 return allow_background_js_access_;
602 } 602 }
603 const std::vector<std::string>& background_scripts() const { 603 const std::vector<std::string>& background_scripts() const {
604 return background_scripts_; 604 return background_scripts_;
605 } 605 }
606 bool background_page_is_transient() const {
607 return background_page_is_transient_;
608 }
609 bool has_persistent_background_page() const { 606 bool has_persistent_background_page() const {
610 return has_background_page() && !background_page_is_transient(); 607 return has_background_page() && background_page_is_persistent_;
611 } 608 }
612 bool has_lazy_background_page() const { 609 bool has_lazy_background_page() const {
613 return has_background_page() && background_page_is_transient(); 610 return has_background_page() && !background_page_is_persistent_;
614 } 611 }
615 const GURL& options_url() const { return options_url_; } 612 const GURL& options_url() const { return options_url_; }
616 const GURL& devtools_url() const { return devtools_url_; } 613 const GURL& devtools_url() const { return devtools_url_; }
617 const ExtensionPermissionSet* optional_permission_set() const { 614 const ExtensionPermissionSet* optional_permission_set() const {
618 return optional_permission_set_.get(); 615 return optional_permission_set_.get();
619 } 616 }
620 const ExtensionPermissionSet* required_permission_set() const { 617 const ExtensionPermissionSet* required_permission_set() const {
621 return required_permission_set_.get(); 618 return required_permission_set_.get();
622 } 619 }
623 const std::vector<std::string>& install_warnings() const { 620 const std::vector<std::string>& install_warnings() const {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 bool LoadPlugins(string16* error); 755 bool LoadPlugins(string16* error);
759 bool LoadNaClModules(string16* error); 756 bool LoadNaClModules(string16* error);
760 bool LoadWebAccessibleResources(string16* error); 757 bool LoadWebAccessibleResources(string16* error);
761 bool CheckRequirements(string16* error); 758 bool CheckRequirements(string16* error);
762 bool LoadDefaultLocale(string16* error); 759 bool LoadDefaultLocale(string16* error);
763 bool LoadOfflineEnabled(string16* error); 760 bool LoadOfflineEnabled(string16* error);
764 bool LoadOptionsPage(string16* error); 761 bool LoadOptionsPage(string16* error);
765 bool LoadBackgroundScripts(string16* error); 762 bool LoadBackgroundScripts(string16* error);
766 bool LoadBackgroundPage(const ExtensionAPIPermissionSet& api_permissions, 763 bool LoadBackgroundPage(const ExtensionAPIPermissionSet& api_permissions,
767 string16* error); 764 string16* error);
768 bool LoadBackgroundTransient( 765 bool LoadBackgroundPersistent(
769 const ExtensionAPIPermissionSet& api_permissions, 766 const ExtensionAPIPermissionSet& api_permissions,
770 string16* error); 767 string16* error);
771 bool LoadBackgroundAllowJSAccess( 768 bool LoadBackgroundAllowJSAccess(
772 const ExtensionAPIPermissionSet& api_permissions, 769 const ExtensionAPIPermissionSet& api_permissions,
773 string16* error); 770 string16* error);
774 // Parses a single action in the manifest. 771 // Parses a single action in the manifest.
775 bool LoadWebIntentAction(const std::string& action_name, 772 bool LoadWebIntentAction(const std::string& action_name,
776 const base::DictionaryValue& intent_service, 773 const base::DictionaryValue& intent_service,
777 string16* error); 774 string16* error);
778 bool LoadWebIntentServices(string16* error); 775 bool LoadWebIntentServices(string16* error);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 base::hash_set<std::string> web_accessible_resources_; 948 base::hash_set<std::string> web_accessible_resources_;
952 949
953 // Optional URL to a master page of which a single instance should be always 950 // Optional URL to a master page of which a single instance should be always
954 // loaded in the background. 951 // loaded in the background.
955 GURL background_url_; 952 GURL background_url_;
956 953
957 // Optional list of scripts to use to generate a background page. If this is 954 // Optional list of scripts to use to generate a background page. If this is
958 // present, background_url_ will be empty and generated by GetBackgroundURL(). 955 // present, background_url_ will be empty and generated by GetBackgroundURL().
959 std::vector<std::string> background_scripts_; 956 std::vector<std::string> background_scripts_;
960 957
961 // False if the background page should stay loaded forever; true if it should 958 // True if the background page should stay loaded forever; false if it should
962 // load on-demand (when it needs to handle an event). Defaults to false. 959 // load on-demand (when it needs to handle an event). Defaults to true.
963 bool background_page_is_transient_; 960 bool background_page_is_persistent_;
964 961
965 // True if the background page can be scripted by pages of the app or 962 // True if the background page can be scripted by pages of the app or
966 // extension, in which case all such pages must run in the same process. 963 // extension, in which case all such pages must run in the same process.
967 // False if such pages are not permitted to script the background page, 964 // False if such pages are not permitted to script the background page,
968 // allowing them to run in different processes. 965 // allowing them to run in different processes.
969 bool allow_background_js_access_; 966 bool allow_background_js_access_;
970 967
971 // Optional URL to a page for setting options/preferences. 968 // Optional URL to a page for setting options/preferences.
972 GURL options_url_; 969 GURL options_url_;
973 970
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 // only contain the removed permissions. 1112 // only contain the removed permissions.
1116 const ExtensionPermissionSet* permissions; 1113 const ExtensionPermissionSet* permissions;
1117 1114
1118 UpdatedExtensionPermissionsInfo( 1115 UpdatedExtensionPermissionsInfo(
1119 const Extension* extension, 1116 const Extension* extension,
1120 const ExtensionPermissionSet* permissions, 1117 const ExtensionPermissionSet* permissions,
1121 Reason reason); 1118 Reason reason);
1122 }; 1119 };
1123 1120
1124 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1121 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/samples.json ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698