[email protected] | f2a893c | 2011-01-05 09:38:07 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
| 5 | // When each service is created, we set a flag indicating this. At this point, |
| 6 | // the service initialization could fail or succeed. This allows us to remember |
| 7 | // if we tried to create a service, and not try creating it over and over if |
| 8 | // the creation failed. |
| 9 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 10 | #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| 11 | #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 12 | #pragma once |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 13 | |
| 14 | #include <string> |
| 15 | |
| 16 | #include "base/basictypes.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 17 | #include "base/memory/scoped_ptr.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 18 | #include "base/message_loop.h" |
[email protected] | c917750 | 2011-01-01 04:48:49 | [diff] [blame] | 19 | #include "base/threading/non_thread_safe.h" |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 20 | #include "base/timer.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 21 | #include "chrome/browser/browser_process.h" |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 22 | #include "chrome/browser/prefs/pref_change_registrar.h" |
[email protected] | 8b08a47f | 2011-02-25 12:36:37 | [diff] [blame] | 23 | #include "chrome/browser/prefs/pref_member.h" |
[email protected] | 67a46b7f | 2009-06-16 21:41:02 | [diff] [blame] | 24 | #include "chrome/browser/tab_contents/thumbnail_generator.h" |
[email protected] | 71bf3f5e | 2011-08-15 21:05:22 | [diff] [blame] | 25 | #include "content/browser/download/download_status_updater.h" |
[email protected] | f20d733 | 2011-03-08 21:11:53 | [diff] [blame] | 26 | #include "content/common/notification_observer.h" |
| 27 | #include "content/common/notification_registrar.h" |
[email protected] | d55aaa13 | 2009-09-28 21:08:04 | [diff] [blame] | 28 | #include "ipc/ipc_message.h" |
[email protected] | b112a4c | 2009-02-01 20:24:01 | [diff] [blame] | 29 | |
[email protected] | 6eac57a | 2011-07-12 21:15:09 | [diff] [blame] | 30 | class BrowserOnlineStateObserver; |
[email protected] | b2fcd0e | 2010-12-01 15:19:40 | [diff] [blame] | 31 | class ChromeNetLog; |
[email protected] | 8bcdf07 | 2011-06-03 16:52:15 | [diff] [blame] | 32 | class ChromeResourceDispatcherHostDelegate; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 33 | class CommandLine; |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 34 | class DevToolsProtocolHandler; |
[email protected] | 4ef795df | 2010-02-03 02:35:08 | [diff] [blame] | 35 | class FilePath; |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 36 | class PluginDataRemover; |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 37 | class RemoteDebuggingServer; |
[email protected] | 0b4d338 | 2010-07-14 16:13:04 | [diff] [blame] | 38 | class TabCloseableStateWatcher; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 39 | |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame^] | 40 | namespace policy { |
[email protected] | fcf5357 | 2011-06-29 15:44:37 | [diff] [blame] | 41 | class BrowserPolicyConnector; |
| 42 | }; |
| 43 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 44 | // Real implementation of BrowserProcess that creates and returns the services. |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 45 | class BrowserProcessImpl : public BrowserProcess, |
[email protected] | c917750 | 2011-01-01 04:48:49 | [diff] [blame] | 46 | public base::NonThreadSafe, |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 47 | public NotificationObserver { |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 48 | public: |
[email protected] | f3a4f30 | 2009-08-21 22:35:29 | [diff] [blame] | 49 | explicit BrowserProcessImpl(const CommandLine& command_line); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 50 | virtual ~BrowserProcessImpl(); |
| 51 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 52 | base::Thread* process_launcher_thread(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 53 | |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 54 | // BrowserProcess methods |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 55 | virtual void EndSession() OVERRIDE; |
| 56 | virtual ResourceDispatcherHost* resource_dispatcher_host() OVERRIDE; |
| 57 | virtual MetricsService* metrics_service() OVERRIDE; |
| 58 | virtual IOThread* io_thread() OVERRIDE; |
| 59 | virtual base::Thread* file_thread() OVERRIDE; |
| 60 | virtual base::Thread* db_thread() OVERRIDE; |
| 61 | virtual base::Thread* cache_thread() OVERRIDE; |
| 62 | virtual WatchDogThread* watchdog_thread() OVERRIDE; |
[email protected] | 2d14b373 | 2011-05-10 16:48:44 | [diff] [blame] | 63 | #if defined(OS_CHROMEOS) |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 64 | virtual base::Thread* web_socket_proxy_thread() OVERRIDE; |
[email protected] | 2d14b373 | 2011-05-10 16:48:44 | [diff] [blame] | 65 | #endif |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 66 | virtual ProfileManager* profile_manager() OVERRIDE; |
| 67 | virtual PrefService* local_state() OVERRIDE; |
| 68 | virtual DevToolsManager* devtools_manager() OVERRIDE; |
| 69 | virtual SidebarManager* sidebar_manager() OVERRIDE; |
| 70 | virtual ui::Clipboard* clipboard() OVERRIDE; |
| 71 | virtual net::URLRequestContextGetter* system_request_context() OVERRIDE; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 72 | #if defined(OS_CHROMEOS) |
| 73 | virtual chromeos::ProxyConfigServiceImpl* |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 74 | chromeos_proxy_config_service_impl() OVERRIDE; |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame^] | 75 | virtual browser::OomPriorityManager* oom_priority_manager() OVERRIDE; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 76 | #endif // defined(OS_CHROMEOS) |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 77 | virtual ExtensionEventRouterForwarder* |
| 78 | extension_event_router_forwarder() OVERRIDE; |
| 79 | virtual NotificationUIManager* notification_ui_manager() OVERRIDE; |
| 80 | virtual policy::BrowserPolicyConnector* browser_policy_connector() OVERRIDE; |
| 81 | virtual IconManager* icon_manager() OVERRIDE; |
| 82 | virtual ThumbnailGenerator* GetThumbnailGenerator() OVERRIDE; |
| 83 | virtual AutomationProviderList* GetAutomationProviderList() OVERRIDE; |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 84 | virtual void InitDevToolsHttpProtocolHandler( |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 85 | Profile* profile, |
[email protected] | 01000cf1 | 2011-02-04 11:39:22 | [diff] [blame] | 86 | const std::string& ip, |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 87 | int port, |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 88 | const std::string& frontend_url) OVERRIDE; |
| 89 | virtual void InitDevToolsLegacyProtocolHandler(int port) OVERRIDE; |
| 90 | virtual unsigned int AddRefModule() OVERRIDE; |
| 91 | virtual unsigned int ReleaseModule() OVERRIDE; |
| 92 | virtual bool IsShuttingDown() OVERRIDE; |
| 93 | virtual printing::PrintJobManager* print_job_manager() OVERRIDE; |
| 94 | virtual printing::PrintPreviewTabController* |
| 95 | print_preview_tab_controller() OVERRIDE; |
| 96 | virtual printing::BackgroundPrintingManager* |
| 97 | background_printing_manager() OVERRIDE; |
| 98 | virtual GoogleURLTracker* google_url_tracker() OVERRIDE; |
| 99 | virtual IntranetRedirectDetector* intranet_redirect_detector() OVERRIDE; |
| 100 | virtual const std::string& GetApplicationLocale() OVERRIDE; |
| 101 | virtual void SetApplicationLocale(const std::string& locale) OVERRIDE; |
| 102 | virtual DownloadStatusUpdater* download_status_updater() OVERRIDE; |
| 103 | virtual DownloadRequestLimiter* download_request_limiter() OVERRIDE; |
| 104 | virtual TabCloseableStateWatcher* tab_closeable_state_watcher() OVERRIDE; |
| 105 | virtual BackgroundModeManager* background_mode_manager() OVERRIDE; |
| 106 | virtual StatusTray* status_tray() OVERRIDE; |
| 107 | virtual SafeBrowsingService* safe_browsing_service() OVERRIDE; |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 108 | virtual safe_browsing::ClientSideDetectionService* |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 109 | safe_browsing_detection_service() OVERRIDE; |
| 110 | virtual bool plugin_finder_disabled() const OVERRIDE; |
[email protected] | 6641bf66 | 2009-08-21 00:34:09 | [diff] [blame] | 111 | |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 112 | // NotificationObserver methods |
[email protected] | 43211582 | 2011-07-10 15:52:27 | [diff] [blame] | 113 | virtual void Observe(int type, |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 114 | const NotificationSource& source, |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 115 | const NotificationDetails& details) OVERRIDE; |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 116 | |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 117 | #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 118 | virtual void StartAutoupdateTimer() OVERRIDE; |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 119 | #endif |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 120 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 121 | virtual ChromeNetLog* net_log() OVERRIDE; |
[email protected] | d6f37fc | 2011-02-13 23:58:41 | [diff] [blame] | 122 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 123 | virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; |
[email protected] | 1459fb6 | 2011-05-25 19:03:27 | [diff] [blame] | 124 | |
[email protected] | d55aaa13 | 2009-09-28 21:08:04 | [diff] [blame] | 125 | #if defined(IPC_MESSAGE_LOG_ENABLED) |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 126 | virtual void SetIPCLoggingEnabled(bool enable) OVERRIDE; |
[email protected] | d55aaa13 | 2009-09-28 21:08:04 | [diff] [blame] | 127 | #endif |
| 128 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 129 | virtual MHTMLGenerationManager* mhtml_generation_manager() OVERRIDE; |
[email protected] | e7f009d | 2011-06-14 19:35:10 | [diff] [blame] | 130 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 131 | virtual GpuBlacklistUpdater* gpu_blacklist_updater() OVERRIDE; |
[email protected] | 87522db9 | 2011-07-28 23:44:14 | [diff] [blame] | 132 | |
[email protected] | 120655d | 2011-09-16 22:10:32 | [diff] [blame] | 133 | virtual ComponentUpdateService* component_updater() OVERRIDE; |
[email protected] | c1adf5a | 2011-08-03 22:11:37 | [diff] [blame] | 134 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 135 | private: |
| 136 | void CreateResourceDispatcherHost(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 137 | void CreateMetricsService(); |
[email protected] | 48ca901 | 2009-08-11 21:38:54 | [diff] [blame] | 138 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 139 | void CreateIOThread(); |
[email protected] | 48ca901 | 2009-08-11 21:38:54 | [diff] [blame] | 140 | static void CleanupOnIOThread(); |
| 141 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 142 | void CreateFileThread(); |
| 143 | void CreateDBThread(); |
[email protected] | 91451171 | 2009-11-23 19:42:33 | [diff] [blame] | 144 | void CreateProcessLauncherThread(); |
[email protected] | 875ee82 | 2010-05-18 20:58:01 | [diff] [blame] | 145 | void CreateCacheThread(); |
[email protected] | 7a31f7c | 2011-03-21 23:22:04 | [diff] [blame] | 146 | void CreateGpuThread(); |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 147 | void CreateWatchdogThread(); |
[email protected] | 2d14b373 | 2011-05-10 16:48:44 | [diff] [blame] | 148 | #if defined(OS_CHROMEOS) |
| 149 | void CreateWebSocketProxyThread(); |
| 150 | #endif |
[email protected] | 8e5c89a | 2011-06-07 18:13:33 | [diff] [blame] | 151 | void CreateTemplateURLService(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 152 | void CreateProfileManager(); |
| 153 | void CreateWebDataService(); |
| 154 | void CreateLocalState(); |
| 155 | void CreateViewedPageTracker(); |
| 156 | void CreateIconManager(); |
[email protected] | 40ecc90 | 2009-03-16 13:42:47 | [diff] [blame] | 157 | void CreateDevToolsManager(); |
[email protected] | 8b8e7c9 | 2010-08-19 18:05:56 | [diff] [blame] | 158 | void CreateSidebarManager(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 159 | void CreateGoogleURLTracker(); |
[email protected] | c4ff495 | 2010-01-08 19:12:47 | [diff] [blame] | 160 | void CreateIntranetRedirectDetector(); |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 161 | void CreateNotificationUIManager(); |
[email protected] | ccb55cf5 | 2010-03-06 22:02:04 | [diff] [blame] | 162 | void CreateStatusTrayManager(); |
[email protected] | 0b4d338 | 2010-07-14 16:13:04 | [diff] [blame] | 163 | void CreateTabCloseableStateWatcher(); |
[email protected] | dbeebd5 | 2010-11-16 20:34:16 | [diff] [blame] | 164 | void CreatePrintPreviewTabController(); |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 165 | void CreateBackgroundPrintingManager(); |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 166 | void CreateSafeBrowsingService(); |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 167 | void CreateSafeBrowsingDetectionService(); |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 168 | void CreateStatusTray(); |
| 169 | void CreateBackgroundModeManager(); |
[email protected] | a7a5e99 | 2010-12-09 23:39:51 | [diff] [blame] | 170 | |
| 171 | bool IsSafeBrowsingDetectionServiceEnabled(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 172 | |
[email protected] | 419a057 | 2011-04-18 22:21:46 | [diff] [blame] | 173 | void ApplyDisabledSchemesPolicy(); |
[email protected] | 40850a5 | 2011-05-26 22:07:35 | [diff] [blame] | 174 | void ApplyAllowCrossOriginAuthPromptPolicy(); |
[email protected] | 419a057 | 2011-04-18 22:21:46 | [diff] [blame] | 175 | |
[email protected] | d55aaa13 | 2009-09-28 21:08:04 | [diff] [blame] | 176 | #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 177 | void SetIPCLoggingEnabledForChildProcesses(bool enabled); |
| 178 | #endif |
| 179 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 180 | bool created_resource_dispatcher_host_; |
| 181 | scoped_ptr<ResourceDispatcherHost> resource_dispatcher_host_; |
| 182 | |
| 183 | bool created_metrics_service_; |
| 184 | scoped_ptr<MetricsService> metrics_service_; |
| 185 | |
| 186 | bool created_io_thread_; |
[email protected] | 0ac8368 | 2010-01-22 17:46:27 | [diff] [blame] | 187 | scoped_ptr<IOThread> io_thread_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 188 | |
| 189 | bool created_file_thread_; |
[email protected] | ab820df | 2008-08-26 05:55:10 | [diff] [blame] | 190 | scoped_ptr<base::Thread> file_thread_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 191 | |
| 192 | bool created_db_thread_; |
[email protected] | ab820df | 2008-08-26 05:55:10 | [diff] [blame] | 193 | scoped_ptr<base::Thread> db_thread_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 194 | |
[email protected] | 91451171 | 2009-11-23 19:42:33 | [diff] [blame] | 195 | bool created_process_launcher_thread_; |
| 196 | scoped_ptr<base::Thread> process_launcher_thread_; |
| 197 | |
[email protected] | 875ee82 | 2010-05-18 20:58:01 | [diff] [blame] | 198 | bool created_cache_thread_; |
| 199 | scoped_ptr<base::Thread> cache_thread_; |
| 200 | |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 201 | bool created_watchdog_thread_; |
| 202 | scoped_ptr<WatchDogThread> watchdog_thread_; |
| 203 | |
[email protected] | 2d14b373 | 2011-05-10 16:48:44 | [diff] [blame] | 204 | #if defined(OS_CHROMEOS) |
| 205 | bool created_web_socket_proxy_thread_; |
| 206 | scoped_ptr<base::Thread> web_socket_proxy_thread_; |
| 207 | #endif |
| 208 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 209 | bool created_profile_manager_; |
| 210 | scoped_ptr<ProfileManager> profile_manager_; |
| 211 | |
| 212 | bool created_local_state_; |
| 213 | scoped_ptr<PrefService> local_state_; |
| 214 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 215 | bool created_icon_manager_; |
| 216 | scoped_ptr<IconManager> icon_manager_; |
| 217 | |
[email protected] | 3ce0241 | 2011-03-01 12:01:15 | [diff] [blame] | 218 | scoped_refptr<ExtensionEventRouterForwarder> |
| 219 | extension_event_router_forwarder_; |
| 220 | |
[email protected] | 4475d23 | 2011-07-27 15:29:20 | [diff] [blame] | 221 | scoped_ptr<RemoteDebuggingServer> remote_debugging_server_; |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 222 | |
| 223 | scoped_refptr<DevToolsProtocolHandler> devtools_legacy_handler_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 224 | |
[email protected] | 40ecc90 | 2009-03-16 13:42:47 | [diff] [blame] | 225 | bool created_devtools_manager_; |
[email protected] | f1038d83 | 2011-08-04 07:52:01 | [diff] [blame] | 226 | scoped_ptr<DevToolsManager> devtools_manager_; |
[email protected] | 40ecc90 | 2009-03-16 13:42:47 | [diff] [blame] | 227 | |
[email protected] | 8b8e7c9 | 2010-08-19 18:05:56 | [diff] [blame] | 228 | bool created_sidebar_manager_; |
| 229 | scoped_refptr<SidebarManager> sidebar_manager_; |
| 230 | |
[email protected] | 985655a | 2011-02-23 09:54:25 | [diff] [blame] | 231 | bool created_browser_policy_connector_; |
| 232 | scoped_ptr<policy::BrowserPolicyConnector> browser_policy_connector_; |
[email protected] | f2a893c | 2011-01-05 09:38:07 | [diff] [blame] | 233 | |
[email protected] | dbeebd5 | 2010-11-16 20:34:16 | [diff] [blame] | 234 | scoped_refptr<printing::PrintPreviewTabController> |
| 235 | print_preview_tab_controller_; |
| 236 | |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 237 | scoped_ptr<printing::BackgroundPrintingManager> background_printing_manager_; |
| 238 | |
[email protected] | 2dfeaf9 | 2011-01-10 21:08:21 | [diff] [blame] | 239 | scoped_ptr<ui::Clipboard> clipboard_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 240 | |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 241 | // Manager for desktop notification UI. |
| 242 | bool created_notification_ui_manager_; |
| 243 | scoped_ptr<NotificationUIManager> notification_ui_manager_; |
| 244 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 245 | scoped_ptr<AutomationProviderList> automation_provider_list_; |
| 246 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 247 | scoped_ptr<GoogleURLTracker> google_url_tracker_; |
[email protected] | c4ff495 | 2010-01-08 19:12:47 | [diff] [blame] | 248 | scoped_ptr<IntranetRedirectDetector> intranet_redirect_detector_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 249 | |
[email protected] | 0b4d338 | 2010-07-14 16:13:04 | [diff] [blame] | 250 | scoped_ptr<TabCloseableStateWatcher> tab_closeable_state_watcher_; |
| 251 | |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 252 | scoped_ptr<BackgroundModeManager> background_mode_manager_; |
| 253 | |
| 254 | scoped_ptr<StatusTray> status_tray_; |
| 255 | |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 256 | bool created_safe_browsing_service_; |
| 257 | scoped_refptr<SafeBrowsingService> safe_browsing_service_; |
| 258 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 259 | unsigned int module_ref_count_; |
[email protected] | afd20c02 | 2010-06-10 00:48:20 | [diff] [blame] | 260 | bool did_start_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 261 | |
| 262 | // Ensures that all the print jobs are finished before closing the browser. |
| 263 | scoped_ptr<printing::PrintJobManager> print_job_manager_; |
| 264 | |
[email protected] | d70539de | 2009-06-24 22:17:06 | [diff] [blame] | 265 | std::string locale_; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 266 | |
[email protected] | 1b2db1a | 2008-08-08 17:46:13 | [diff] [blame] | 267 | bool checked_for_new_frames_; |
| 268 | bool using_new_frames_; |
| 269 | |
[email protected] | cb85aba | 2010-09-22 18:34:15 | [diff] [blame] | 270 | // This service just sits around and makes thumbnails for tabs. It does |
| 271 | // nothing in the constructor so we don't have to worry about lazy init. |
[email protected] | 67a46b7f | 2009-06-16 21:41:02 | [diff] [blame] | 272 | ThumbnailGenerator thumbnail_generator_; |
[email protected] | 67a46b7f | 2009-06-16 21:41:02 | [diff] [blame] | 273 | |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 274 | // Download status updates (like a changing application icon on dock/taskbar) |
| 275 | // are global per-application. DownloadStatusUpdater does no work in the ctor |
| 276 | // so we don't have to worry about lazy initialization. |
| 277 | DownloadStatusUpdater download_status_updater_; |
| 278 | |
[email protected] | 254ed74 | 2011-08-16 18:45:27 | [diff] [blame] | 279 | scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
| 280 | |
[email protected] | 2a7e7c15 | 2010-10-01 20:12:09 | [diff] [blame] | 281 | // Ensures that the observers of plugin/print disable/enable state |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 282 | // notifications are properly added and removed. |
[email protected] | 2a7e7c15 | 2010-10-01 20:12:09 | [diff] [blame] | 283 | PrefChangeRegistrar pref_change_registrar_; |
[email protected] | 492d214 | 2010-09-10 13:55:18 | [diff] [blame] | 284 | |
[email protected] | b2fcd0e | 2010-12-01 15:19:40 | [diff] [blame] | 285 | // Lives here so can safely log events on shutdown. |
| 286 | scoped_ptr<ChromeNetLog> net_log_; |
| 287 | |
[email protected] | 8bcdf07 | 2011-06-03 16:52:15 | [diff] [blame] | 288 | // Ordered before resource_dispatcher_host_delegate_ due to destruction |
[email protected] | 1459fb6 | 2011-05-25 19:03:27 | [diff] [blame] | 289 | // ordering. |
| 290 | scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
| 291 | |
[email protected] | 8bcdf07 | 2011-06-03 16:52:15 | [diff] [blame] | 292 | scoped_ptr<ChromeResourceDispatcherHostDelegate> |
| 293 | resource_dispatcher_host_delegate_; |
[email protected] | 1459fb6 | 2011-05-25 19:03:27 | [diff] [blame] | 294 | |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 295 | NotificationRegistrar notification_registrar_; |
[email protected] | 6618d1d | 2010-12-15 21:18:47 | [diff] [blame] | 296 | |
[email protected] | e7f009d | 2011-06-14 19:35:10 | [diff] [blame] | 297 | scoped_refptr<MHTMLGenerationManager> mhtml_generation_manager_; |
| 298 | |
[email protected] | 8b08a47f | 2011-02-25 12:36:37 | [diff] [blame] | 299 | // Monitors the state of the 'DisablePluginFinder' policy. |
| 300 | BooleanPrefMember plugin_finder_disabled_pref_; |
| 301 | |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 302 | #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 303 | base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
| 304 | |
| 305 | // Gets called by autoupdate timer to see if browser needs restart and can be |
| 306 | // restarted, and if that's the case, restarts the browser. |
| 307 | void OnAutoupdateTimer(); |
| 308 | bool CanAutorestartForUpdate() const; |
| 309 | void RestartPersistentInstance(); |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 310 | #endif // defined(OS_WIN) || defined(OS_LINUX) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 311 | |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 312 | #if defined(OS_CHROMEOS) |
| 313 | scoped_refptr<chromeos::ProxyConfigServiceImpl> |
| 314 | chromeos_proxy_config_service_impl_; |
[email protected] | 5b86996 | 2011-09-20 19:49:33 | [diff] [blame^] | 315 | scoped_ptr<browser::OomPriorityManager> oom_priority_manager_; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 316 | #endif |
| 317 | |
[email protected] | 6eac57a | 2011-07-12 21:15:09 | [diff] [blame] | 318 | // Per-process listener for online state changes. |
| 319 | scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
| 320 | |
[email protected] | 87522db9 | 2011-07-28 23:44:14 | [diff] [blame] | 321 | scoped_refptr<GpuBlacklistUpdater> gpu_blacklist_updater_; |
| 322 | |
[email protected] | c1adf5a | 2011-08-03 22:11:37 | [diff] [blame] | 323 | #if !defined(OS_CHROMEOS) |
| 324 | scoped_ptr<ComponentUpdateService> component_updater_; |
| 325 | #endif |
| 326 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 327 | DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 328 | }; |
| 329 | |
[email protected] | 58dca55 | 2009-06-17 00:35:02 | [diff] [blame] | 330 | #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |