| 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 | 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 Loading... |
| 599 } | 599 } |
| 600 const std::vector<PluginInfo>& plugins() const { return plugins_; } | 600 const std::vector<PluginInfo>& plugins() const { return plugins_; } |
| 601 const std::vector<NaClModuleInfo>& nacl_modules() const { | 601 const std::vector<NaClModuleInfo>& nacl_modules() const { |
| 602 return nacl_modules_; | 602 return nacl_modules_; |
| 603 } | 603 } |
| 604 const std::vector<InputComponentInfo>& input_components() const { | 604 const std::vector<InputComponentInfo>& input_components() const { |
| 605 return input_components_; | 605 return input_components_; |
| 606 } | 606 } |
| 607 // The browser action command that the extension wants to use, which is not | 607 // The browser action command that the extension wants to use, which is not |
| 608 // necessarily the one it can use, as it might be inactive (see also | 608 // necessarily the one it can use, as it might be inactive (see also |
| 609 // GetActiveBrowserActionCommand in ExtensionKeybindingRegistry). | 609 // GetBrowserActionCommand in CommandService). |
| 610 const extensions::Command* browser_action_command() const { | 610 const extensions::Command* browser_action_command() const { |
| 611 return browser_action_command_.get(); | 611 return browser_action_command_.get(); |
| 612 } | 612 } |
| 613 // The page action command that the extension wants to use, which is not | 613 // The page action command that the extension wants to use, which is not |
| 614 // necessarily the one it can use, as it might be inactive (see also | 614 // necessarily the one it can use, as it might be inactive (see also |
| 615 // GetActivePageActionCommand in ExtensionKeybindingRegistry). | 615 // GetPageActionCommand in CommandService). |
| 616 const extensions::Command* page_action_command() const { | 616 const extensions::Command* page_action_command() const { |
| 617 return page_action_command_.get(); | 617 return page_action_command_.get(); |
| 618 } | 618 } |
| 619 // The script badge command that the extension wants to use, which is not |
| 620 // necessarily the one it can use, as it might be inactive (see also |
| 621 // GetScriptBadgeCommand in CommandService). |
| 622 const extensions::Command* script_badge_command() const { |
| 623 return script_badge_command_.get(); |
| 624 } |
| 619 // The map (of command names to commands) that the extension wants to use, | 625 // The map (of command names to commands) that the extension wants to use, |
| 620 // which is not necessarily the one it can use, as they might be inactive | 626 // which is not necessarily the one it can use, as they might be inactive |
| 621 // (see also GetActiveNamedCommands in ExtensionKeybindingRegistry). | 627 // (see also GetNamedCommands in CommandService). |
| 622 const extensions::CommandMap& named_commands() const { | 628 const extensions::CommandMap& named_commands() const { |
| 623 return named_commands_; | 629 return named_commands_; |
| 624 } | 630 } |
| 625 bool has_background_page() const { | 631 bool has_background_page() const { |
| 626 return background_url_.is_valid() || !background_scripts_.empty(); | 632 return background_url_.is_valid() || !background_scripts_.empty(); |
| 627 } | 633 } |
| 628 bool allow_background_js_access() const { | 634 bool allow_background_js_access() const { |
| 629 return allow_background_js_access_; | 635 return allow_background_js_access_; |
| 630 } | 636 } |
| 631 const std::vector<std::string>& background_scripts() const { | 637 const std::vector<std::string>& background_scripts() const { |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 | 995 |
| 990 // Optional list of NaCl modules and associated properties. | 996 // Optional list of NaCl modules and associated properties. |
| 991 std::vector<NaClModuleInfo> nacl_modules_; | 997 std::vector<NaClModuleInfo> nacl_modules_; |
| 992 | 998 |
| 993 // Optional list of input components and associated properties. | 999 // Optional list of input components and associated properties. |
| 994 std::vector<InputComponentInfo> input_components_; | 1000 std::vector<InputComponentInfo> input_components_; |
| 995 | 1001 |
| 996 // Optional list of commands (keyboard shortcuts). | 1002 // Optional list of commands (keyboard shortcuts). |
| 997 scoped_ptr<extensions::Command> browser_action_command_; | 1003 scoped_ptr<extensions::Command> browser_action_command_; |
| 998 scoped_ptr<extensions::Command> page_action_command_; | 1004 scoped_ptr<extensions::Command> page_action_command_; |
| 1005 scoped_ptr<extensions::Command> script_badge_command_; |
| 999 extensions::CommandMap named_commands_; | 1006 extensions::CommandMap named_commands_; |
| 1000 | 1007 |
| 1001 // Optional list of web accessible extension resources. | 1008 // Optional list of web accessible extension resources. |
| 1002 URLPatternSet web_accessible_resources_; | 1009 URLPatternSet web_accessible_resources_; |
| 1003 | 1010 |
| 1004 // Optional list of extension pages that are sandboxed (served from a unique | 1011 // Optional list of extension pages that are sandboxed (served from a unique |
| 1005 // origin with a different Content Security Policy). | 1012 // origin with a different Content Security Policy). |
| 1006 URLPatternSet sandboxed_pages_; | 1013 URLPatternSet sandboxed_pages_; |
| 1007 | 1014 |
| 1008 // Content Security Policy that should be used to enforce the sandbox used | 1015 // Content Security Policy that should be used to enforce the sandbox used |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1180 | 1187 |
| 1181 UpdatedExtensionPermissionsInfo( | 1188 UpdatedExtensionPermissionsInfo( |
| 1182 const Extension* extension, | 1189 const Extension* extension, |
| 1183 const PermissionSet* permissions, | 1190 const PermissionSet* permissions, |
| 1184 Reason reason); | 1191 Reason reason); |
| 1185 }; | 1192 }; |
| 1186 | 1193 |
| 1187 } // namespace extensions | 1194 } // namespace extensions |
| 1188 | 1195 |
| 1189 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1196 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |