1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/extensions/browser_context_keyed_service_factories.h"
6
7#include "chrome/browser/extensions/activity_log/activity_log.h"
8#include "chrome/browser/extensions/api/activity_log_private/activity_log_private_api.h"
9#include "chrome/browser/extensions/api/alarms/alarm_manager.h"
10#include "chrome/browser/extensions/api/audio/audio_api.h"
11#include "chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.h"
12#include "chrome/browser/extensions/api/bookmarks/bookmarks_api.h"
13#include "chrome/browser/extensions/api/braille_display_private/braille_display_private_api.h"
14#include "chrome/browser/extensions/api/commands/command_service.h"
15#include "chrome/browser/extensions/api/content_settings/content_settings_service.h"
16#include "chrome/browser/extensions/api/cookies/cookies_api.h"
17#include "chrome/browser/extensions/api/developer_private/developer_private_api.h"
18#include "chrome/browser/extensions/api/dial/dial_api_factory.h"
19#include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
20#include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h"
21#include "chrome/browser/extensions/api/font_settings/font_settings_api.h"
22#include "chrome/browser/extensions/api/gcd_private/gcd_private_api.h"
23#include "chrome/browser/extensions/api/history/history_api.h"
24#include "chrome/browser/extensions/api/hotword_private/hotword_private_api.h"
25#include "chrome/browser/extensions/api/identity/identity_api.h"
26#include "chrome/browser/extensions/api/idle/idle_manager_factory.h"
27#include "chrome/browser/extensions/api/input/input.h"
28#include "chrome/browser/extensions/api/location/location_manager.h"
29#include "chrome/browser/extensions/api/management/management_api.h"
30#include "chrome/browser/extensions/api/mdns/mdns_api.h"
31#include "chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h"
32#include "chrome/browser/extensions/api/networking_private/networking_private_event_router_factory.h"
33#include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
34#include "chrome/browser/extensions/api/preference/chrome_direct_setting_api.h"
35#include "chrome/browser/extensions/api/preference/preference_api.h"
36#include "chrome/browser/extensions/api/processes/processes_api.h"
37#include "chrome/browser/extensions/api/push_messaging/push_messaging_api.h"
38#include "chrome/browser/extensions/api/screenlock_private/screenlock_private_api.h"
39#include "chrome/browser/extensions/api/sessions/sessions_api.h"
40#include "chrome/browser/extensions/api/settings_overrides/settings_overrides_api.h"
41#include "chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager.h"
42#include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
43#include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h"
44#include "chrome/browser/extensions/api/tabs/tabs_windows_api.h"
45#include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
46#include "chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.h"
47#include "chrome/browser/extensions/api/webstore/webstore_api.h"
48#include "chrome/browser/extensions/extension_garbage_collector_factory.h"
49#include "chrome/browser/extensions/extension_gcm_app_handler.h"
50#include "chrome/browser/extensions/extension_storage_monitor_factory.h"
51#include "chrome/browser/extensions/extension_system_factory.h"
52#include "chrome/browser/extensions/extension_toolbar_model_factory.h"
53#include "chrome/browser/extensions/extension_web_ui_override_registrar.h"
54#include "chrome/browser/extensions/install_tracker_factory.h"
55#include "chrome/browser/extensions/menu_manager_factory.h"
56#include "chrome/browser/extensions/plugin_manager.h"
57#include "chrome/browser/extensions/token_cache/token_cache_service_factory.h"
58#include "chrome/browser/speech/extension_api/tts_extension_api.h"
59#include "extensions/browser/api/api_resource_manager.h"
60#include "extensions/browser/api/bluetooth/bluetooth_api.h"
61#include "extensions/browser/api/bluetooth/bluetooth_private_api.h"
62#include "extensions/browser/api/bluetooth_low_energy/bluetooth_low_energy_api.h"
63#include "extensions/browser/api/bluetooth_socket/bluetooth_socket_event_dispatcher.h"
64#include "extensions/browser/api/power/power_api_manager.h"
65#include "extensions/browser/api/usb/usb_device_resource.h"
66#include "extensions/browser/api/web_request/web_request_api.h"
67
68#if defined(OS_CHROMEOS)
69#include "chrome/browser/chromeos/extensions/file_manager/event_router_factory.h"
70#include "chrome/browser/chromeos/extensions/input_method_api.h"
71#include "chrome/browser/chromeos/extensions/media_player_api.h"
72#include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
73#include "chrome/browser/extensions/api/log_private/log_private_api.h"
74#endif
75
76#if defined(ENABLE_SPELLCHECK)
77#include "chrome/browser/extensions/api/spellcheck/spellcheck_api.h"
78#endif
79
80namespace chrome_extensions {
81
82void EnsureBrowserContextKeyedServiceFactoriesBuilt() {
83  extensions::ActivityLog::GetFactoryInstance();
84  extensions::ActivityLogAPI::GetFactoryInstance();
85  extensions::AlarmManager::GetFactoryInstance();
86  extensions::ApiResourceManager<
87      extensions::UsbDeviceResource>::GetFactoryInstance();
88  extensions::AudioAPI::GetFactoryInstance();
89  extensions::BookmarksAPI::GetFactoryInstance();
90  extensions::BookmarkManagerPrivateAPI::GetFactoryInstance();
91  extensions::BluetoothAPI::GetFactoryInstance();
92  extensions::BluetoothLowEnergyAPI::GetFactoryInstance();
93  extensions::BluetoothPrivateAPI::GetFactoryInstance();
94  extensions::BrailleDisplayPrivateAPI::GetFactoryInstance();
95  extensions::chromedirectsetting::ChromeDirectSettingAPI::GetFactoryInstance();
96  extensions::CommandService::GetFactoryInstance();
97  extensions::ContentSettingsService::GetFactoryInstance();
98  extensions::CookiesAPI::GetFactoryInstance();
99  extensions::DeveloperPrivateAPI::GetFactoryInstance();
100  extensions::DialAPIFactory::GetInstance();
101  extensions::ExtensionActionAPI::GetFactoryInstance();
102  extensions::ExtensionGarbageCollectorFactory::GetInstance();
103  extensions::ExtensionStorageMonitorFactory::GetInstance();
104  extensions::ExtensionSystemFactory::GetInstance();
105  extensions::ExtensionToolbarModelFactory::GetInstance();
106  extensions::ExtensionWebUIOverrideRegistrar::GetFactoryInstance();
107  extensions::FeedbackPrivateAPI::GetFactoryInstance();
108  extensions::FontSettingsAPI::GetFactoryInstance();
109  extensions::GcdPrivateAPI::GetFactoryInstance();
110  extensions::HistoryAPI::GetFactoryInstance();
111  extensions::HotwordPrivateEventService::GetFactoryInstance();
112  extensions::IdentityAPI::GetFactoryInstance();
113  extensions::IdleManagerFactory::GetInstance();
114  extensions::InstallTrackerFactory::GetInstance();
115#if defined(TOOLKIT_VIEWS)
116  extensions::InputAPI::GetFactoryInstance();
117#endif
118#if defined(OS_CHROMEOS)
119  extensions::InputImeAPI::GetFactoryInstance();
120  extensions::InputMethodAPI::GetFactoryInstance();
121#endif
122  extensions::LocationManager::GetFactoryInstance();
123#if defined(OS_CHROMEOS)
124  extensions::LogPrivateAPI::GetFactoryInstance();
125#endif
126  extensions::ManagementAPI::GetFactoryInstance();
127  extensions::MDnsAPI::GetFactoryInstance();
128  extensions::MediaGalleriesPrivateAPI::GetFactoryInstance();
129#if defined(OS_CHROMEOS)
130  extensions::MediaPlayerAPI::GetFactoryInstance();
131#endif
132  extensions::MenuManagerFactory::GetInstance();
133#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_MACOSX)
134  extensions::NetworkingPrivateEventRouterFactory::GetInstance();
135#endif
136  extensions::OmniboxAPI::GetFactoryInstance();
137#if defined(ENABLE_PLUGINS)
138  extensions::PluginManager::GetFactoryInstance();
139#endif  // defined(ENABLE_PLUGINS)
140  extensions::PowerApiManager::GetFactoryInstance();
141  extensions::PreferenceAPI::GetFactoryInstance();
142  extensions::ProcessesAPI::GetFactoryInstance();
143  extensions::PushMessagingAPI::GetFactoryInstance();
144  extensions::ScreenlockPrivateEventRouter::GetFactoryInstance();
145#if !defined(USE_ATHENA)
146  extensions::SessionsAPI::GetFactoryInstance();
147#endif
148  extensions::SettingsOverridesAPI::GetFactoryInstance();
149  extensions::SignedInDevicesManager::GetFactoryInstance();
150#if defined(ENABLE_SPELLCHECK)
151  extensions::SpellcheckAPI::GetFactoryInstance();
152#endif
153  extensions::StreamsPrivateAPI::GetFactoryInstance();
154#if !defined(USE_ATHENA)
155  extensions::TabCaptureRegistry::GetFactoryInstance();
156  extensions::TabsWindowsAPI::GetFactoryInstance();
157#endif
158  extensions::TtsAPI::GetFactoryInstance();
159  extensions::WebNavigationAPI::GetFactoryInstance();
160  extensions::WebRequestAPI::GetFactoryInstance();
161  extensions::WebrtcAudioPrivateEventService::GetFactoryInstance();
162  extensions::WebstoreAPI::GetFactoryInstance();
163#if defined(OS_CHROMEOS)
164  file_manager::EventRouterFactory::GetInstance();
165#endif
166  TokenCacheServiceFactory::GetInstance();
167  extensions::ExtensionGCMAppHandler::GetFactoryInstance();
168  extensions::core_api::BluetoothSocketEventDispatcher::GetFactoryInstance();
169}
170
171}  // namespace chrome_extensions
172