OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // When each service is created, we set a flag indicating this. At this point, | 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 | 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 | 7 // if we tried to create a service, and not try creating it over and over if |
8 // the creation failed. | 8 // the creation failed. |
9 | 9 |
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
(...skipping 17 matching lines...) Expand all Loading... | |
28 #include "ipc/ipc_message.h" | 28 #include "ipc/ipc_message.h" |
29 | 29 |
30 class ChromeNetLog; | 30 class ChromeNetLog; |
31 class CommandLine; | 31 class CommandLine; |
32 class DevToolsHttpProtocolHandler; | 32 class DevToolsHttpProtocolHandler; |
33 class DevToolsProtocolHandler; | 33 class DevToolsProtocolHandler; |
34 class FilePath; | 34 class FilePath; |
35 class NotificationService; | 35 class NotificationService; |
36 class PluginDataRemover; | 36 class PluginDataRemover; |
37 class TabCloseableStateWatcher; | 37 class TabCloseableStateWatcher; |
38 namespace prerender { | |
mmenke
2011/05/23 21:58:41
nit: space above this line.
dominich
2011/05/23 22:22:55
Done.
| |
39 class PrerenderTracker; | |
40 } | |
38 | 41 |
39 // Real implementation of BrowserProcess that creates and returns the services. | 42 // Real implementation of BrowserProcess that creates and returns the services. |
40 class BrowserProcessImpl : public BrowserProcess, | 43 class BrowserProcessImpl : public BrowserProcess, |
41 public base::NonThreadSafe, | 44 public base::NonThreadSafe, |
42 public NotificationObserver { | 45 public NotificationObserver { |
43 public: | 46 public: |
44 explicit BrowserProcessImpl(const CommandLine& command_line); | 47 explicit BrowserProcessImpl(const CommandLine& command_line); |
45 virtual ~BrowserProcessImpl(); | 48 virtual ~BrowserProcessImpl(); |
46 | 49 |
47 virtual void EndSession(); | 50 virtual void EndSession(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 virtual void Observe(NotificationType type, | 107 virtual void Observe(NotificationType type, |
105 const NotificationSource& source, | 108 const NotificationSource& source, |
106 const NotificationDetails& details); | 109 const NotificationDetails& details); |
107 | 110 |
108 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 111 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
109 virtual void StartAutoupdateTimer(); | 112 virtual void StartAutoupdateTimer(); |
110 #endif | 113 #endif |
111 | 114 |
112 virtual ChromeNetLog* net_log(); | 115 virtual ChromeNetLog* net_log(); |
113 | 116 |
117 virtual prerender::PrerenderTracker* prerender_tracker(); | |
118 | |
114 #if defined(IPC_MESSAGE_LOG_ENABLED) | 119 #if defined(IPC_MESSAGE_LOG_ENABLED) |
115 virtual void SetIPCLoggingEnabled(bool enable); | 120 virtual void SetIPCLoggingEnabled(bool enable); |
116 #endif | 121 #endif |
117 | 122 |
118 private: | 123 private: |
119 void ClearLocalState(const FilePath& profile_path); | 124 void ClearLocalState(const FilePath& profile_path); |
120 bool ShouldClearLocalState(FilePath* profile_path); | 125 bool ShouldClearLocalState(FilePath* profile_path); |
121 | 126 |
122 void CreateResourceDispatcherHost(); | 127 void CreateResourceDispatcherHost(); |
123 void CreateMetricsService(); | 128 void CreateMetricsService(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 // An event that notifies when we are shutting-down. | 274 // An event that notifies when we are shutting-down. |
270 scoped_ptr<base::WaitableEvent> shutdown_event_; | 275 scoped_ptr<base::WaitableEvent> shutdown_event_; |
271 | 276 |
272 // Ensures that the observers of plugin/print disable/enable state | 277 // Ensures that the observers of plugin/print disable/enable state |
273 // notifications are properly added and removed. | 278 // notifications are properly added and removed. |
274 PrefChangeRegistrar pref_change_registrar_; | 279 PrefChangeRegistrar pref_change_registrar_; |
275 | 280 |
276 // Lives here so can safely log events on shutdown. | 281 // Lives here so can safely log events on shutdown. |
277 scoped_ptr<ChromeNetLog> net_log_; | 282 scoped_ptr<ChromeNetLog> net_log_; |
278 | 283 |
284 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; | |
285 | |
279 NotificationRegistrar notification_registrar_; | 286 NotificationRegistrar notification_registrar_; |
280 scoped_refptr<PluginDataRemover> plugin_data_remover_; | 287 scoped_refptr<PluginDataRemover> plugin_data_remover_; |
281 | 288 |
282 // Monitors the state of the 'DisablePluginFinder' policy. | 289 // Monitors the state of the 'DisablePluginFinder' policy. |
283 BooleanPrefMember plugin_finder_disabled_pref_; | 290 BooleanPrefMember plugin_finder_disabled_pref_; |
284 | 291 |
285 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 292 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
286 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; | 293 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
287 | 294 |
288 // Gets called by autoupdate timer to see if browser needs restart and can be | 295 // Gets called by autoupdate timer to see if browser needs restart and can be |
289 // restarted, and if that's the case, restarts the browser. | 296 // restarted, and if that's the case, restarts the browser. |
290 void OnAutoupdateTimer(); | 297 void OnAutoupdateTimer(); |
291 bool CanAutorestartForUpdate() const; | 298 bool CanAutorestartForUpdate() const; |
292 void RestartPersistentInstance(); | 299 void RestartPersistentInstance(); |
293 #endif // defined(OS_WIN) || defined(OS_LINUX) | 300 #endif // defined(OS_WIN) || defined(OS_LINUX) |
294 | 301 |
295 #if defined(OS_CHROMEOS) | 302 #if defined(OS_CHROMEOS) |
296 scoped_refptr<chromeos::ProxyConfigServiceImpl> | 303 scoped_refptr<chromeos::ProxyConfigServiceImpl> |
297 chromeos_proxy_config_service_impl_; | 304 chromeos_proxy_config_service_impl_; |
298 #endif | 305 #endif |
299 | 306 |
300 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 307 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
301 }; | 308 }; |
302 | 309 |
303 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 310 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |