| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 TYPE_HOSTED_APP, | 95 TYPE_HOSTED_APP, |
| 96 TYPE_PACKAGED_APP | 96 TYPE_PACKAGED_APP |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 // An NPAPI plugin included in the extension. | 99 // An NPAPI plugin included in the extension. |
| 100 struct PluginInfo { | 100 struct PluginInfo { |
| 101 FilePath path; // Path to the plugin. | 101 FilePath path; // Path to the plugin. |
| 102 bool is_public; // False if only this extension can load this plugin. | 102 bool is_public; // False if only this extension can load this plugin. |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 // An NaCl module included in the extension. |
| 106 struct NaClModuleInfo { |
| 107 FilePath path; |
| 108 std::string mime_type; |
| 109 }; |
| 110 |
| 105 struct TtsVoice { | 111 struct TtsVoice { |
| 106 std::string voice_name; | 112 std::string voice_name; |
| 107 std::string locale; | 113 std::string locale; |
| 108 std::string gender; | 114 std::string gender; |
| 109 }; | 115 }; |
| 110 | 116 |
| 111 // A permission is defined by its |name| (what is used in the manifest), | 117 // A permission is defined by its |name| (what is used in the manifest), |
| 112 // and the |message_id| that's used by install/update UI. | 118 // and the |message_id| that's used by install/update UI. |
| 113 struct Permission { | 119 struct Permission { |
| 114 const char* const name; | 120 const char* const name; |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 bool converted_from_user_script() const { | 496 bool converted_from_user_script() const { |
| 491 return converted_from_user_script_; | 497 return converted_from_user_script_; |
| 492 } | 498 } |
| 493 const UserScriptList& content_scripts() const { return content_scripts_; } | 499 const UserScriptList& content_scripts() const { return content_scripts_; } |
| 494 ExtensionAction* page_action() const { return page_action_.get(); } | 500 ExtensionAction* page_action() const { return page_action_.get(); } |
| 495 ExtensionAction* browser_action() const { return browser_action_.get(); } | 501 ExtensionAction* browser_action() const { return browser_action_.get(); } |
| 496 ExtensionSidebarDefaults* sidebar_defaults() const { | 502 ExtensionSidebarDefaults* sidebar_defaults() const { |
| 497 return sidebar_defaults_.get(); | 503 return sidebar_defaults_.get(); |
| 498 } | 504 } |
| 499 const std::vector<PluginInfo>& plugins() const { return plugins_; } | 505 const std::vector<PluginInfo>& plugins() const { return plugins_; } |
| 506 const std::vector<NaClModuleInfo>& nacl_modules() const { |
| 507 return nacl_modules_; |
| 508 } |
| 500 const GURL& background_url() const { return background_url_; } | 509 const GURL& background_url() const { return background_url_; } |
| 501 const GURL& options_url() const { return options_url_; } | 510 const GURL& options_url() const { return options_url_; } |
| 502 const GURL& devtools_url() const { return devtools_url_; } | 511 const GURL& devtools_url() const { return devtools_url_; } |
| 503 const std::vector<GURL>& toolstrips() const { return toolstrips_; } | 512 const std::vector<GURL>& toolstrips() const { return toolstrips_; } |
| 504 const std::set<std::string>& api_permissions() const { | 513 const std::set<std::string>& api_permissions() const { |
| 505 return api_permissions_; | 514 return api_permissions_; |
| 506 } | 515 } |
| 507 const URLPatternList& host_permissions() const { return host_permissions_; } | 516 const URLPatternList& host_permissions() const { return host_permissions_; } |
| 508 const GURL& update_url() const { return update_url_; } | 517 const GURL& update_url() const { return update_url_; } |
| 509 const ExtensionIconSet& icons() const { return icons_; } | 518 const ExtensionIconSet& icons() const { return icons_; } |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 | 727 |
| 719 // The extension's browser action, if any. | 728 // The extension's browser action, if any. |
| 720 scoped_ptr<ExtensionAction> browser_action_; | 729 scoped_ptr<ExtensionAction> browser_action_; |
| 721 | 730 |
| 722 // The extension's sidebar, if any. | 731 // The extension's sidebar, if any. |
| 723 scoped_ptr<ExtensionSidebarDefaults> sidebar_defaults_; | 732 scoped_ptr<ExtensionSidebarDefaults> sidebar_defaults_; |
| 724 | 733 |
| 725 // Optional list of NPAPI plugins and associated properties. | 734 // Optional list of NPAPI plugins and associated properties. |
| 726 std::vector<PluginInfo> plugins_; | 735 std::vector<PluginInfo> plugins_; |
| 727 | 736 |
| 737 // Optional list of NaCl modules and associated properties. |
| 738 std::vector<NaClModuleInfo> nacl_modules_; |
| 739 |
| 728 // Optional URL to a master page of which a single instance should be always | 740 // Optional URL to a master page of which a single instance should be always |
| 729 // loaded in the background. | 741 // loaded in the background. |
| 730 GURL background_url_; | 742 GURL background_url_; |
| 731 | 743 |
| 732 // Optional URL to a page for setting options/preferences. | 744 // Optional URL to a page for setting options/preferences. |
| 733 GURL options_url_; | 745 GURL options_url_; |
| 734 | 746 |
| 735 // Optional URL to a devtools extension page. | 747 // Optional URL to a devtools extension page. |
| 736 GURL devtools_url_; | 748 GURL devtools_url_; |
| 737 | 749 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 // Was the extension already disabled? | 876 // Was the extension already disabled? |
| 865 bool already_disabled; | 877 bool already_disabled; |
| 866 | 878 |
| 867 // The extension being unloaded - this should always be non-NULL. | 879 // The extension being unloaded - this should always be non-NULL. |
| 868 const Extension* extension; | 880 const Extension* extension; |
| 869 | 881 |
| 870 UnloadedExtensionInfo(const Extension* extension, Reason reason); | 882 UnloadedExtensionInfo(const Extension* extension, Reason reason); |
| 871 }; | 883 }; |
| 872 | 884 |
| 873 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 885 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |