| 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 // 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 12 matching lines...) Expand all Loading... |
| 23 #include "chrome/browser/prefs/pref_change_registrar.h" | 23 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 24 #include "chrome/browser/prefs/pref_member.h" | 24 #include "chrome/browser/prefs/pref_member.h" |
| 25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
| 26 | 26 |
| 27 class ChromeNetLog; | 27 class ChromeNetLog; |
| 28 class ChromeResourceDispatcherHostDelegate; | 28 class ChromeResourceDispatcherHostDelegate; |
| 29 class CommandLine; | 29 class CommandLine; |
| 30 class RemoteDebuggingServer; | 30 class RemoteDebuggingServer; |
| 31 class TabCloseableStateWatcher; | 31 class TabCloseableStateWatcher; |
| 32 | 32 |
| 33 namespace chrome { |
| 34 class MediaDeviceManager; |
| 35 } |
| 36 |
| 33 namespace policy { | 37 namespace policy { |
| 34 class BrowserPolicyConnector; | 38 class BrowserPolicyConnector; |
| 35 class PolicyService; | 39 class PolicyService; |
| 36 }; | 40 }; |
| 37 | 41 |
| 38 // Real implementation of BrowserProcess that creates and returns the services. | 42 // Real implementation of BrowserProcess that creates and returns the services. |
| 39 class BrowserProcessImpl : public BrowserProcess, | 43 class BrowserProcessImpl : public BrowserProcess, |
| 40 public base::NonThreadSafe, | 44 public base::NonThreadSafe, |
| 41 public content::NotificationObserver { | 45 public content::NotificationObserver { |
| 42 public: | 46 public: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 virtual bool plugin_finder_disabled() const OVERRIDE; | 110 virtual bool plugin_finder_disabled() const OVERRIDE; |
| 107 | 111 |
| 108 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 112 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 109 virtual void StartAutoupdateTimer() OVERRIDE; | 113 virtual void StartAutoupdateTimer() OVERRIDE; |
| 110 #endif | 114 #endif |
| 111 | 115 |
| 112 virtual ChromeNetLog* net_log() OVERRIDE; | 116 virtual ChromeNetLog* net_log() OVERRIDE; |
| 113 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; | 117 virtual prerender::PrerenderTracker* prerender_tracker() OVERRIDE; |
| 114 virtual ComponentUpdateService* component_updater() OVERRIDE; | 118 virtual ComponentUpdateService* component_updater() OVERRIDE; |
| 115 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; | 119 virtual CRLSetFetcher* crl_set_fetcher() OVERRIDE; |
| 120 virtual chrome::MediaDeviceManager* media_device_manager() OVERRIDE; |
| 121 |
| 116 | 122 |
| 117 // content::NotificationObserver implementation. | 123 // content::NotificationObserver implementation. |
| 118 virtual void Observe(int type, | 124 virtual void Observe(int type, |
| 119 const content::NotificationSource& source, | 125 const content::NotificationSource& source, |
| 120 const content::NotificationDetails& details) OVERRIDE; | 126 const content::NotificationDetails& details) OVERRIDE; |
| 121 | 127 |
| 122 private: | 128 private: |
| 123 void CreateMetricsService(); | 129 void CreateMetricsService(); |
| 124 void CreateWatchdogThread(); | 130 void CreateWatchdogThread(); |
| 125 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // Ordered before resource_dispatcher_host_delegate_ due to destruction | 237 // Ordered before resource_dispatcher_host_delegate_ due to destruction |
| 232 // ordering. | 238 // ordering. |
| 233 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; | 239 scoped_ptr<prerender::PrerenderTracker> prerender_tracker_; |
| 234 | 240 |
| 235 scoped_ptr<ChromeResourceDispatcherHostDelegate> | 241 scoped_ptr<ChromeResourceDispatcherHostDelegate> |
| 236 resource_dispatcher_host_delegate_; | 242 resource_dispatcher_host_delegate_; |
| 237 | 243 |
| 238 // Monitors the state of the 'DisablePluginFinder' policy. | 244 // Monitors the state of the 'DisablePluginFinder' policy. |
| 239 scoped_ptr<BooleanPrefMember> plugin_finder_disabled_pref_; | 245 scoped_ptr<BooleanPrefMember> plugin_finder_disabled_pref_; |
| 240 | 246 |
| 247 // Keeps track of media device attachments/detechments. |
| 248 scoped_ptr<chrome::MediaDeviceManager> media_device_manager_; |
| 249 |
| 241 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 250 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 242 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; | 251 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
| 243 | 252 |
| 244 // Gets called by autoupdate timer to see if browser needs restart and can be | 253 // Gets called by autoupdate timer to see if browser needs restart and can be |
| 245 // restarted, and if that's the case, restarts the browser. | 254 // restarted, and if that's the case, restarts the browser. |
| 246 void OnAutoupdateTimer(); | 255 void OnAutoupdateTimer(); |
| 247 bool CanAutorestartForUpdate() const; | 256 bool CanAutorestartForUpdate() const; |
| 248 void RestartBackgroundInstance(); | 257 void RestartBackgroundInstance(); |
| 249 #endif // defined(OS_WIN) || defined(OS_LINUX) && !defined(OS_CHROMEOS) | 258 #endif // defined(OS_WIN) || defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 250 | 259 |
| 251 #if defined(OS_CHROMEOS) | 260 #if defined(OS_CHROMEOS) |
| 252 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; | 261 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; |
| 253 #else | 262 #else |
| 254 scoped_ptr<ComponentUpdateService> component_updater_; | 263 scoped_ptr<ComponentUpdateService> component_updater_; |
| 255 | 264 |
| 256 scoped_refptr<CRLSetFetcher> crl_set_fetcher_; | 265 scoped_refptr<CRLSetFetcher> crl_set_fetcher_; |
| 257 #endif | 266 #endif |
| 258 | 267 |
| 259 // TODO(eroman): Remove this when done debugging 113031. This tracks | 268 // TODO(eroman): Remove this when done debugging 113031. This tracks |
| 260 // the callstack which released the final module reference count. | 269 // the callstack which released the final module reference count. |
| 261 base::debug::StackTrace release_last_reference_callstack_; | 270 base::debug::StackTrace release_last_reference_callstack_; |
| 262 | 271 |
| 263 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 272 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
| 264 }; | 273 }; |
| 265 | 274 |
| 266 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 275 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| OLD | NEW |