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

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

Issue 11611004: Move the InputComponents out of extensions entirely. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 11 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
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 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 FilePath path; // Path to the plugin. 168 FilePath path; // Path to the plugin.
169 bool is_public; // False if only this extension can load this plugin. 169 bool is_public; // False if only this extension can load this plugin.
170 }; 170 };
171 171
172 // An NaCl module included in the extension. 172 // An NaCl module included in the extension.
173 struct NaClModuleInfo { 173 struct NaClModuleInfo {
174 GURL url; 174 GURL url;
175 std::string mime_type; 175 std::string mime_type;
176 }; 176 };
177 177
178 enum InputComponentType {
179 INPUT_COMPONENT_TYPE_NONE = -1,
180 INPUT_COMPONENT_TYPE_IME,
181 INPUT_COMPONENT_TYPE_COUNT
182 };
183
184 struct InputComponentInfo {
185 // Define out of line constructor/destructor to please Clang.
186 InputComponentInfo();
187 ~InputComponentInfo();
188
189 std::string name;
190 InputComponentType type;
191 std::string id;
192 std::string description;
193 std::string language;
194 std::set<std::string> layouts;
195 std::string shortcut_keycode;
196 bool shortcut_alt;
197 bool shortcut_ctrl;
198 bool shortcut_shift;
199 };
200
201 struct TtsVoice { 178 struct TtsVoice {
202 // Define out of line constructor/destructor to please Clang. 179 // Define out of line constructor/destructor to please Clang.
203 TtsVoice(); 180 TtsVoice();
204 ~TtsVoice(); 181 ~TtsVoice();
205 182
206 std::string voice_name; 183 std::string voice_name;
207 std::string lang; 184 std::string lang;
208 std::string gender; 185 std::string gender;
209 std::set<std::string> event_types; 186 std::set<std::string> event_types;
210 }; 187 };
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 const ActionInfo* browser_action_info() const { 671 const ActionInfo* browser_action_info() const {
695 return browser_action_info_.get(); 672 return browser_action_info_.get();
696 } 673 }
697 const ActionInfo* system_indicator_info() const { 674 const ActionInfo* system_indicator_info() const {
698 return system_indicator_info_.get(); 675 return system_indicator_info_.get();
699 } 676 }
700 const std::vector<PluginInfo>& plugins() const { return plugins_; } 677 const std::vector<PluginInfo>& plugins() const { return plugins_; }
701 const std::vector<NaClModuleInfo>& nacl_modules() const { 678 const std::vector<NaClModuleInfo>& nacl_modules() const {
702 return nacl_modules_; 679 return nacl_modules_;
703 } 680 }
704 const std::vector<InputComponentInfo>& input_components() const {
705 return input_components_;
706 }
707 // The browser action command that the extension wants to use, which is not 681 // The browser action command that the extension wants to use, which is not
708 // necessarily the one it can use, as it might be inactive (see also 682 // necessarily the one it can use, as it might be inactive (see also
709 // GetBrowserActionCommand in CommandService). 683 // GetBrowserActionCommand in CommandService).
710 const extensions::Command* browser_action_command() const { 684 const extensions::Command* browser_action_command() const {
711 return browser_action_command_.get(); 685 return browser_action_command_.get();
712 } 686 }
713 // The page action command that the extension wants to use, which is not 687 // The page action command that the extension wants to use, which is not
714 // necessarily the one it can use, as it might be inactive (see also 688 // necessarily the one it can use, as it might be inactive (see also
715 // GetPageActionCommand in CommandService). 689 // GetPageActionCommand in CommandService).
716 const extensions::Command* page_action_command() const { 690 const extensions::Command* page_action_command() const {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 string16* error); 912 string16* error);
939 bool LoadWebIntentServices(string16* error); 913 bool LoadWebIntentServices(string16* error);
940 bool LoadFileHandler(const std::string& handler_id, 914 bool LoadFileHandler(const std::string& handler_id,
941 const base::DictionaryValue& handler_info, 915 const base::DictionaryValue& handler_info,
942 string16* error); 916 string16* error);
943 bool LoadFileHandlers(string16* error); 917 bool LoadFileHandlers(string16* error);
944 bool LoadExtensionFeatures(APIPermissionSet* api_permissions, 918 bool LoadExtensionFeatures(APIPermissionSet* api_permissions,
945 string16* error); 919 string16* error);
946 bool LoadManifestHandlerFeatures(string16* error); 920 bool LoadManifestHandlerFeatures(string16* error);
947 bool LoadDevToolsPage(string16* error); 921 bool LoadDevToolsPage(string16* error);
948 bool LoadInputComponents(const APIPermissionSet& api_permissions,
949 string16* error);
950 bool LoadContentScripts(string16* error); 922 bool LoadContentScripts(string16* error);
951 bool LoadPageAction(string16* error); 923 bool LoadPageAction(string16* error);
952 bool LoadBrowserAction(string16* error); 924 bool LoadBrowserAction(string16* error);
953 bool LoadScriptBadge(string16* error); 925 bool LoadScriptBadge(string16* error);
954 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error); 926 bool LoadSystemIndicator(APIPermissionSet* api_permissions, string16* error);
955 bool LoadChromeURLOverrides(string16* error); 927 bool LoadChromeURLOverrides(string16* error);
956 bool LoadTextToSpeechVoices(string16* error); 928 bool LoadTextToSpeechVoices(string16* error);
957 bool LoadIncognitoMode(string16* error); 929 bool LoadIncognitoMode(string16* error);
958 bool LoadContentSecurityPolicy(string16* error); 930 bool LoadContentSecurityPolicy(string16* error);
959 931
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1080
1109 // The extension's system indicator, if any. 1081 // The extension's system indicator, if any.
1110 scoped_ptr<ActionInfo> system_indicator_info_; 1082 scoped_ptr<ActionInfo> system_indicator_info_;
1111 1083
1112 // Optional list of NPAPI plugins and associated properties. 1084 // Optional list of NPAPI plugins and associated properties.
1113 std::vector<PluginInfo> plugins_; 1085 std::vector<PluginInfo> plugins_;
1114 1086
1115 // Optional list of NaCl modules and associated properties. 1087 // Optional list of NaCl modules and associated properties.
1116 std::vector<NaClModuleInfo> nacl_modules_; 1088 std::vector<NaClModuleInfo> nacl_modules_;
1117 1089
1118 // Optional list of input components and associated properties.
1119 std::vector<InputComponentInfo> input_components_;
1120
1121 // Optional list of commands (keyboard shortcuts). 1090 // Optional list of commands (keyboard shortcuts).
1122 scoped_ptr<extensions::Command> browser_action_command_; 1091 scoped_ptr<extensions::Command> browser_action_command_;
1123 scoped_ptr<extensions::Command> page_action_command_; 1092 scoped_ptr<extensions::Command> page_action_command_;
1124 scoped_ptr<extensions::Command> script_badge_command_; 1093 scoped_ptr<extensions::Command> script_badge_command_;
1125 extensions::CommandMap named_commands_; 1094 extensions::CommandMap named_commands_;
1126 1095
1127 // Optional list of web accessible extension resources. 1096 // Optional list of web accessible extension resources.
1128 URLPatternSet web_accessible_resources_; 1097 URLPatternSet web_accessible_resources_;
1129 1098
1130 // Optional list of extension pages that are sandboxed (served from a unique 1099 // Optional list of extension pages that are sandboxed (served from a unique
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1314 1283
1315 UpdatedExtensionPermissionsInfo( 1284 UpdatedExtensionPermissionsInfo(
1316 const Extension* extension, 1285 const Extension* extension,
1317 const PermissionSet* permissions, 1286 const PermissionSet* permissions,
1318 Reason reason); 1287 Reason reason);
1319 }; 1288 };
1320 1289
1321 } // namespace extensions 1290 } // namespace extensions
1322 1291
1323 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ 1292 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/input_ime/input_components_handler.cc ('k') | chrome/common/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698