| OLD | NEW |
| 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 <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 } | 549 } |
| 550 const std::vector<InputComponentInfo>& input_components() const { | 550 const std::vector<InputComponentInfo>& input_components() const { |
| 551 return input_components_; | 551 return input_components_; |
| 552 } | 552 } |
| 553 const std::vector<ExtensionKeybinding>& keybindings() const { | 553 const std::vector<ExtensionKeybinding>& keybindings() const { |
| 554 return commands_; | 554 return commands_; |
| 555 } | 555 } |
| 556 bool has_background_page() const { | 556 bool has_background_page() const { |
| 557 return background_url_.is_valid() || !background_scripts_.empty(); | 557 return background_url_.is_valid() || !background_scripts_.empty(); |
| 558 } | 558 } |
| 559 bool allow_background_js_access() const { |
| 560 return allow_background_js_access_; |
| 561 } |
| 559 const std::vector<std::string>& background_scripts() const { | 562 const std::vector<std::string>& background_scripts() const { |
| 560 return background_scripts_; | 563 return background_scripts_; |
| 561 } | 564 } |
| 562 bool background_page_persists() const { return background_page_persists_; } | 565 bool background_page_persists() const { return background_page_persists_; } |
| 563 const GURL& options_url() const { return options_url_; } | 566 const GURL& options_url() const { return options_url_; } |
| 564 const GURL& devtools_url() const { return devtools_url_; } | 567 const GURL& devtools_url() const { return devtools_url_; } |
| 565 const ExtensionPermissionSet* optional_permission_set() const { | 568 const ExtensionPermissionSet* optional_permission_set() const { |
| 566 return optional_permission_set_.get(); | 569 return optional_permission_set_.get(); |
| 567 } | 570 } |
| 568 const ExtensionPermissionSet* required_permission_set() const { | 571 const ExtensionPermissionSet* required_permission_set() const { |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 bool LoadLaunchContainer(string16* error); | 685 bool LoadLaunchContainer(string16* error); |
| 683 bool LoadLaunchURL(string16* error); | 686 bool LoadLaunchURL(string16* error); |
| 684 bool LoadAppIsolation(string16* error); | 687 bool LoadAppIsolation(string16* error); |
| 685 bool LoadWebIntentServices(string16* error); | 688 bool LoadWebIntentServices(string16* error); |
| 686 bool LoadBackgroundScripts(string16* error); | 689 bool LoadBackgroundScripts(string16* error); |
| 687 bool LoadBackgroundPage(const ExtensionAPIPermissionSet& api_permissions, | 690 bool LoadBackgroundPage(const ExtensionAPIPermissionSet& api_permissions, |
| 688 string16* error); | 691 string16* error); |
| 689 bool LoadBackgroundPersistent( | 692 bool LoadBackgroundPersistent( |
| 690 const ExtensionAPIPermissionSet& api_permissions, | 693 const ExtensionAPIPermissionSet& api_permissions, |
| 691 string16* error); | 694 string16* error); |
| 695 bool LoadBackgroundAllowJsAccess( |
| 696 const ExtensionAPIPermissionSet& api_permissions, |
| 697 string16* error); |
| 692 | 698 |
| 693 // Helper method that loads a UserScript object from a | 699 // Helper method that loads a UserScript object from a |
| 694 // dictionary in the content_script list of the manifest. | 700 // dictionary in the content_script list of the manifest. |
| 695 bool LoadUserScriptHelper(const base::DictionaryValue* content_script, | 701 bool LoadUserScriptHelper(const base::DictionaryValue* content_script, |
| 696 int definition_index, | 702 int definition_index, |
| 697 int flags, | 703 int flags, |
| 698 string16* error, | 704 string16* error, |
| 699 UserScript* result); | 705 UserScript* result); |
| 700 | 706 |
| 701 // Helper method that loads either the include_globs or exclude_globs list | 707 // Helper method that loads either the include_globs or exclude_globs list |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 GURL background_url_; | 841 GURL background_url_; |
| 836 | 842 |
| 837 // Optional list of scripts to use to generate a background page. If this is | 843 // Optional list of scripts to use to generate a background page. If this is |
| 838 // present, background_url_ will be empty and generated by GetBackgroundURL(). | 844 // present, background_url_ will be empty and generated by GetBackgroundURL(). |
| 839 std::vector<std::string> background_scripts_; | 845 std::vector<std::string> background_scripts_; |
| 840 | 846 |
| 841 // True if the background page should stay loaded forever; false if it should | 847 // True if the background page should stay loaded forever; false if it should |
| 842 // load on-demand (when it needs to handle an event). Defaults to true. | 848 // load on-demand (when it needs to handle an event). Defaults to true. |
| 843 bool background_page_persists_; | 849 bool background_page_persists_; |
| 844 | 850 |
| 851 // True if the background page can be scripted by pages of the app or |
| 852 // extension, in which case all such pages must run in the same process. |
| 853 // False if such pages are not permitted to script the background page, |
| 854 // allowing them to run in different processes. |
| 855 bool allow_background_js_access_; |
| 856 |
| 845 // Optional URL to a page for setting options/preferences. | 857 // Optional URL to a page for setting options/preferences. |
| 846 GURL options_url_; | 858 GURL options_url_; |
| 847 | 859 |
| 848 // Optional URL to a devtools extension page. | 860 // Optional URL to a devtools extension page. |
| 849 GURL devtools_url_; | 861 GURL devtools_url_; |
| 850 | 862 |
| 851 // The public key used to sign the contents of the crx package. | 863 // The public key used to sign the contents of the crx package. |
| 852 std::string public_key_; | 864 std::string public_key_; |
| 853 | 865 |
| 854 // A map of resource id's to relative file paths. | 866 // A map of resource id's to relative file paths. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 // only contain the removed permissions. | 998 // only contain the removed permissions. |
| 987 const ExtensionPermissionSet* permissions; | 999 const ExtensionPermissionSet* permissions; |
| 988 | 1000 |
| 989 UpdatedExtensionPermissionsInfo( | 1001 UpdatedExtensionPermissionsInfo( |
| 990 const Extension* extension, | 1002 const Extension* extension, |
| 991 const ExtensionPermissionSet* permissions, | 1003 const ExtensionPermissionSet* permissions, |
| 992 Reason reason); | 1004 Reason reason); |
| 993 }; | 1005 }; |
| 994 | 1006 |
| 995 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1007 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |