Chromium Code Reviews| 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 <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 private: | 178 private: |
| 179 ui::Accelerator ParseImpl(const std::string& shortcut, | 179 ui::Accelerator ParseImpl(const std::string& shortcut, |
| 180 const std::string& platform_key, | 180 const std::string& platform_key, |
| 181 int index, | 181 int index, |
| 182 string16* error); | 182 string16* error); |
| 183 std::string command_name_; | 183 std::string command_name_; |
| 184 ui::Accelerator accelerator_; | 184 ui::Accelerator accelerator_; |
| 185 std::string description_; | 185 std::string description_; |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 // A mapping of command name (std::string) to a keybinding object. | |
| 188 typedef std::map<std::string, ExtensionKeybinding> CommandMap; | 189 typedef std::map<std::string, ExtensionKeybinding> CommandMap; |
| 189 | 190 |
| 190 struct TtsVoice { | 191 struct TtsVoice { |
| 191 // Define out of line constructor/destructor to please Clang. | 192 // Define out of line constructor/destructor to please Clang. |
| 192 TtsVoice(); | 193 TtsVoice(); |
| 193 ~TtsVoice(); | 194 ~TtsVoice(); |
| 194 | 195 |
| 195 std::string voice_name; | 196 std::string voice_name; |
| 196 std::string lang; | 197 std::string lang; |
| 197 std::string gender; | 198 std::string gender; |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 578 const FileBrowserHandlerList* file_browser_handlers() const { | 579 const FileBrowserHandlerList* file_browser_handlers() const { |
| 579 return file_browser_handlers_.get(); | 580 return file_browser_handlers_.get(); |
| 580 } | 581 } |
| 581 const std::vector<PluginInfo>& plugins() const { return plugins_; } | 582 const std::vector<PluginInfo>& plugins() const { return plugins_; } |
| 582 const std::vector<NaClModuleInfo>& nacl_modules() const { | 583 const std::vector<NaClModuleInfo>& nacl_modules() const { |
| 583 return nacl_modules_; | 584 return nacl_modules_; |
| 584 } | 585 } |
| 585 const std::vector<InputComponentInfo>& input_components() const { | 586 const std::vector<InputComponentInfo>& input_components() const { |
| 586 return input_components_; | 587 return input_components_; |
| 587 } | 588 } |
| 589 // The browser action command keybinding that the extension wants to use, | |
|
Aaron Boodman
2012/04/25 19:14:38
Sigh. Bummer to carry this information around in e
Finnur
2012/04/26 13:12:35
Yup. Sounds good.
| |
| 590 // which is not necessarily the one it can use, as it might be inacive. | |
| 591 // (see also GetActiveBrowserActionCommand in ExtensionKeybindingRegistry). | |
| 588 const ExtensionKeybinding* browser_action_command() const { | 592 const ExtensionKeybinding* browser_action_command() const { |
| 589 return browser_action_command_.get(); | 593 return browser_action_command_.get(); |
| 590 } | 594 } |
| 595 // The page action command keybinding that the extension wants to use, | |
| 596 // which is not necessarily the one it can use, as it might be inacive. | |
| 597 // (see also GetActivePageActionCommand in ExtensionKeybindingRegistry). | |
| 591 const ExtensionKeybinding* page_action_command() const { | 598 const ExtensionKeybinding* page_action_command() const { |
| 592 return page_action_command_.get(); | 599 return page_action_command_.get(); |
| 593 } | 600 } |
| 601 // The map of named commands to keybindings that the extension wants to use, | |
| 602 // which is not necessarily the one it can use, as they might be inacive. | |
| 603 // (see also GetActiveNamedCommands in ExtensionKeybindingRegistry). | |
| 594 const CommandMap& named_commands() const { | 604 const CommandMap& named_commands() const { |
| 595 return named_commands_; | 605 return named_commands_; |
| 596 } | 606 } |
| 597 bool has_background_page() const { | 607 bool has_background_page() const { |
| 598 return background_url_.is_valid() || !background_scripts_.empty(); | 608 return background_url_.is_valid() || !background_scripts_.empty(); |
| 599 } | 609 } |
| 600 bool allow_background_js_access() const { | 610 bool allow_background_js_access() const { |
| 601 return allow_background_js_access_; | 611 return allow_background_js_access_; |
| 602 } | 612 } |
| 603 const std::vector<std::string>& background_scripts() const { | 613 const std::vector<std::string>& background_scripts() const { |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1136 // only contain the removed permissions. | 1146 // only contain the removed permissions. |
| 1137 const ExtensionPermissionSet* permissions; | 1147 const ExtensionPermissionSet* permissions; |
| 1138 | 1148 |
| 1139 UpdatedExtensionPermissionsInfo( | 1149 UpdatedExtensionPermissionsInfo( |
| 1140 const Extension* extension, | 1150 const Extension* extension, |
| 1141 const ExtensionPermissionSet* permissions, | 1151 const ExtensionPermissionSet* permissions, |
| 1142 Reason reason); | 1152 Reason reason); |
| 1143 }; | 1153 }; |
| 1144 | 1154 |
| 1145 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 1155 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |