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 #include "chrome/browser/extensions/extension_function_registry.h" | 5 #include "chrome/browser/extensions/extension_function_registry.h" |
6 | 6 |
7 #include "chrome/browser/accessibility/accessibility_extension_api.h" | 7 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
8 #include "chrome/browser/bookmarks/bookmark_extension_api.h" | 8 #include "chrome/browser/bookmarks/bookmark_extension_api.h" |
9 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h" | 9 #include "chrome/browser/bookmarks/bookmark_manager_extension_api.h" |
10 #include "chrome/browser/download/download_extension_api.h" | 10 #include "chrome/browser/download/download_extension_api.h" |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
238 RegisterFunction<ExtensionTestQuotaResetFunction>(); | 238 RegisterFunction<ExtensionTestQuotaResetFunction>(); |
239 RegisterFunction<ExtensionTestCreateIncognitoTabFunction>(); | 239 RegisterFunction<ExtensionTestCreateIncognitoTabFunction>(); |
240 RegisterFunction<ExtensionTestSendMessageFunction>(); | 240 RegisterFunction<ExtensionTestSendMessageFunction>(); |
241 RegisterFunction<ExtensionTestGetConfigFunction>(); | 241 RegisterFunction<ExtensionTestGetConfigFunction>(); |
242 | 242 |
243 // Accessibility. | 243 // Accessibility. |
244 RegisterFunction<GetFocusedControlFunction>(); | 244 RegisterFunction<GetFocusedControlFunction>(); |
245 RegisterFunction<SetAccessibilityEnabledFunction>(); | 245 RegisterFunction<SetAccessibilityEnabledFunction>(); |
246 RegisterFunction<GetAlertsForTabFunction>(); | 246 RegisterFunction<GetAlertsForTabFunction>(); |
247 | 247 |
248 #if defined(ENABLE_INPUT_SPEECH) | |
Satish
2012/05/20 22:57:46
the TTS extension api doesn't use the same ENABLE
Primiano Tucci (use gerrit)
2012/05/21 10:33:55
+dmazzoni@ regarding this: deassertion of ENABLE_I
| |
248 // Text-to-speech. | 249 // Text-to-speech. |
249 RegisterFunction<ExtensionTtsEngineSendTtsEventFunction>(); | 250 RegisterFunction<ExtensionTtsEngineSendTtsEventFunction>(); |
250 RegisterFunction<ExtensionTtsGetVoicesFunction>(); | 251 RegisterFunction<ExtensionTtsGetVoicesFunction>(); |
251 RegisterFunction<ExtensionTtsIsSpeakingFunction>(); | 252 RegisterFunction<ExtensionTtsIsSpeakingFunction>(); |
252 RegisterFunction<ExtensionTtsSpeakFunction>(); | 253 RegisterFunction<ExtensionTtsSpeakFunction>(); |
253 RegisterFunction<ExtensionTtsStopSpeakingFunction>(); | 254 RegisterFunction<ExtensionTtsStopSpeakingFunction>(); |
255 #endif | |
254 | 256 |
255 // Context Menus. | 257 // Context Menus. |
256 RegisterFunction<extensions::CreateContextMenuFunction>(); | 258 RegisterFunction<extensions::CreateContextMenuFunction>(); |
257 RegisterFunction<extensions::UpdateContextMenuFunction>(); | 259 RegisterFunction<extensions::UpdateContextMenuFunction>(); |
258 RegisterFunction<extensions::RemoveContextMenuFunction>(); | 260 RegisterFunction<extensions::RemoveContextMenuFunction>(); |
259 RegisterFunction<extensions::RemoveAllContextMenusFunction>(); | 261 RegisterFunction<extensions::RemoveAllContextMenusFunction>(); |
260 | 262 |
261 // Omnibox. | 263 // Omnibox. |
262 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); | 264 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); |
263 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); | 265 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); |
264 | 266 |
267 #if defined(ENABLE_INPUT_SPEECH) | |
265 // Speech input. | 268 // Speech input. |
266 RegisterFunction<StartSpeechInputFunction>(); | 269 RegisterFunction<StartSpeechInputFunction>(); |
267 RegisterFunction<StopSpeechInputFunction>(); | 270 RegisterFunction<StopSpeechInputFunction>(); |
268 RegisterFunction<IsRecordingSpeechInputFunction>(); | 271 RegisterFunction<IsRecordingSpeechInputFunction>(); |
272 #endif | |
269 | 273 |
270 #if defined(TOOLKIT_VIEWS) | 274 #if defined(TOOLKIT_VIEWS) |
271 // Input. | 275 // Input. |
272 RegisterFunction<SendKeyboardEventInputFunction>(); | 276 RegisterFunction<SendKeyboardEventInputFunction>(); |
273 #endif | 277 #endif |
274 | 278 |
275 #if defined(USE_VIRTUAL_KEYBOARD) | 279 #if defined(USE_VIRTUAL_KEYBOARD) |
276 RegisterFunction<HideKeyboardFunction>(); | 280 RegisterFunction<HideKeyboardFunction>(); |
277 RegisterFunction<SetKeyboardHeightFunction>(); | 281 RegisterFunction<SetKeyboardHeightFunction>(); |
278 #endif | 282 #endif |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 } | 551 } |
548 | 552 |
549 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( | 553 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( |
550 const std::string& name) { | 554 const std::string& name) { |
551 FactoryMap::iterator iter = factories_.find(name); | 555 FactoryMap::iterator iter = factories_.find(name); |
552 DCHECK(iter != factories_.end()); | 556 DCHECK(iter != factories_.end()); |
553 ExtensionFunction* function = iter->second(); | 557 ExtensionFunction* function = iter->second(); |
554 function->set_name(name); | 558 function->set_name(name); |
555 return function; | 559 return function; |
556 } | 560 } |
OLD | NEW |