| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 RegisterFunction<ExtensionTestQuotaResetFunction>(); | 240 RegisterFunction<ExtensionTestQuotaResetFunction>(); |
| 241 RegisterFunction<ExtensionTestCreateIncognitoTabFunction>(); | 241 RegisterFunction<ExtensionTestCreateIncognitoTabFunction>(); |
| 242 RegisterFunction<ExtensionTestSendMessageFunction>(); | 242 RegisterFunction<ExtensionTestSendMessageFunction>(); |
| 243 RegisterFunction<ExtensionTestGetConfigFunction>(); | 243 RegisterFunction<ExtensionTestGetConfigFunction>(); |
| 244 | 244 |
| 245 // Accessibility. | 245 // Accessibility. |
| 246 RegisterFunction<GetFocusedControlFunction>(); | 246 RegisterFunction<GetFocusedControlFunction>(); |
| 247 RegisterFunction<SetAccessibilityEnabledFunction>(); | 247 RegisterFunction<SetAccessibilityEnabledFunction>(); |
| 248 RegisterFunction<GetAlertsForTabFunction>(); | 248 RegisterFunction<GetAlertsForTabFunction>(); |
| 249 | 249 |
| 250 #if defined(ENABLE_INPUT_SPEECH) |
| 250 // Text-to-speech. | 251 // Text-to-speech. |
| 251 RegisterFunction<ExtensionTtsEngineSendTtsEventFunction>(); | 252 RegisterFunction<ExtensionTtsEngineSendTtsEventFunction>(); |
| 252 RegisterFunction<ExtensionTtsGetVoicesFunction>(); | 253 RegisterFunction<ExtensionTtsGetVoicesFunction>(); |
| 253 RegisterFunction<ExtensionTtsIsSpeakingFunction>(); | 254 RegisterFunction<ExtensionTtsIsSpeakingFunction>(); |
| 254 RegisterFunction<ExtensionTtsSpeakFunction>(); | 255 RegisterFunction<ExtensionTtsSpeakFunction>(); |
| 255 RegisterFunction<ExtensionTtsStopSpeakingFunction>(); | 256 RegisterFunction<ExtensionTtsStopSpeakingFunction>(); |
| 257 #endif |
| 256 | 258 |
| 257 // Context Menus. | 259 // Context Menus. |
| 258 RegisterFunction<extensions::CreateContextMenuFunction>(); | 260 RegisterFunction<extensions::CreateContextMenuFunction>(); |
| 259 RegisterFunction<extensions::UpdateContextMenuFunction>(); | 261 RegisterFunction<extensions::UpdateContextMenuFunction>(); |
| 260 RegisterFunction<extensions::RemoveContextMenuFunction>(); | 262 RegisterFunction<extensions::RemoveContextMenuFunction>(); |
| 261 RegisterFunction<extensions::RemoveAllContextMenusFunction>(); | 263 RegisterFunction<extensions::RemoveAllContextMenusFunction>(); |
| 262 | 264 |
| 263 // Omnibox. | 265 // Omnibox. |
| 264 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); | 266 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); |
| 265 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); | 267 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); |
| 266 | 268 |
| 269 #if defined(ENABLE_INPUT_SPEECH) |
| 267 // Speech input. | 270 // Speech input. |
| 268 RegisterFunction<StartSpeechInputFunction>(); | 271 RegisterFunction<StartSpeechInputFunction>(); |
| 269 RegisterFunction<StopSpeechInputFunction>(); | 272 RegisterFunction<StopSpeechInputFunction>(); |
| 270 RegisterFunction<IsRecordingSpeechInputFunction>(); | 273 RegisterFunction<IsRecordingSpeechInputFunction>(); |
| 274 #endif |
| 271 | 275 |
| 272 #if defined(TOOLKIT_VIEWS) | 276 #if defined(TOOLKIT_VIEWS) |
| 273 // Input. | 277 // Input. |
| 274 RegisterFunction<SendKeyboardEventInputFunction>(); | 278 RegisterFunction<SendKeyboardEventInputFunction>(); |
| 275 #endif | 279 #endif |
| 276 | 280 |
| 277 #if defined(USE_VIRTUAL_KEYBOARD) | 281 #if defined(USE_VIRTUAL_KEYBOARD) |
| 278 RegisterFunction<HideKeyboardFunction>(); | 282 RegisterFunction<HideKeyboardFunction>(); |
| 279 RegisterFunction<SetKeyboardHeightFunction>(); | 283 RegisterFunction<SetKeyboardHeightFunction>(); |
| 280 #endif | 284 #endif |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 } | 555 } |
| 552 | 556 |
| 553 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( | 557 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( |
| 554 const std::string& name) { | 558 const std::string& name) { |
| 555 FactoryMap::iterator iter = factories_.find(name); | 559 FactoryMap::iterator iter = factories_.find(name); |
| 556 DCHECK(iter != factories_.end()); | 560 DCHECK(iter != factories_.end()); |
| 557 ExtensionFunction* function = iter->second(); | 561 ExtensionFunction* function = iter->second(); |
| 558 function->set_name(name); | 562 function->set_name(name); |
| 559 return function; | 563 return function; |
| 560 } | 564 } |
| OLD | NEW |