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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // Context Menus. | 253 // Context Menus. |
254 RegisterFunction<extensions::CreateContextMenuFunction>(); | 254 RegisterFunction<extensions::CreateContextMenuFunction>(); |
255 RegisterFunction<extensions::UpdateContextMenuFunction>(); | 255 RegisterFunction<extensions::UpdateContextMenuFunction>(); |
256 RegisterFunction<extensions::RemoveContextMenuFunction>(); | 256 RegisterFunction<extensions::RemoveContextMenuFunction>(); |
257 RegisterFunction<extensions::RemoveAllContextMenusFunction>(); | 257 RegisterFunction<extensions::RemoveAllContextMenusFunction>(); |
258 | 258 |
259 // Omnibox. | 259 // Omnibox. |
260 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); | 260 RegisterFunction<extensions::OmniboxSendSuggestionsFunction>(); |
261 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); | 261 RegisterFunction<extensions::OmniboxSetDefaultSuggestionFunction>(); |
262 | 262 |
| 263 #if defined(ENABLE_INPUT_SPEECH) |
263 // Speech input. | 264 // Speech input. |
264 RegisterFunction<StartSpeechInputFunction>(); | 265 RegisterFunction<StartSpeechInputFunction>(); |
265 RegisterFunction<StopSpeechInputFunction>(); | 266 RegisterFunction<StopSpeechInputFunction>(); |
266 RegisterFunction<IsRecordingSpeechInputFunction>(); | 267 RegisterFunction<IsRecordingSpeechInputFunction>(); |
| 268 #endif |
267 | 269 |
268 #if defined(TOOLKIT_VIEWS) | 270 #if defined(TOOLKIT_VIEWS) |
269 // Input. | 271 // Input. |
270 RegisterFunction<SendKeyboardEventInputFunction>(); | 272 RegisterFunction<SendKeyboardEventInputFunction>(); |
271 #endif | 273 #endif |
272 | 274 |
273 #if defined(OS_CHROMEOS) | 275 #if defined(OS_CHROMEOS) |
274 // IME | 276 // IME |
275 RegisterFunction<SetCompositionFunction>(); | 277 RegisterFunction<SetCompositionFunction>(); |
276 RegisterFunction<ClearCompositionFunction>(); | 278 RegisterFunction<ClearCompositionFunction>(); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 } | 528 } |
527 | 529 |
528 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( | 530 ExtensionFunction* ExtensionFunctionRegistry::NewFunction( |
529 const std::string& name) { | 531 const std::string& name) { |
530 FactoryMap::iterator iter = factories_.find(name); | 532 FactoryMap::iterator iter = factories_.find(name); |
531 DCHECK(iter != factories_.end()); | 533 DCHECK(iter != factories_.end()); |
532 ExtensionFunction* function = iter->second(); | 534 ExtensionFunction* function = iter->second(); |
533 function->set_name(name); | 535 function->set_name(name); |
534 return function; | 536 return function; |
535 } | 537 } |
OLD | NEW |