| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_ |
| 11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| 12 #pragma once | 12 #pragma once |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "base/message_loop.h" | 17 #include "base/message_loop.h" |
| 18 #include "base/non_thread_safe.h" | 18 #include "base/non_thread_safe.h" |
| 19 #include "base/timer.h" | 19 #include "base/timer.h" |
| 20 #include "base/scoped_ptr.h" | 20 #include "base/scoped_ptr.h" |
| 21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/download/download_status_updater.h" | 22 #include "chrome/browser/download/download_status_updater.h" |
| 23 #include "chrome/browser/prefs/pref_change_registrar.h" | 23 #include "chrome/browser/prefs/pref_change_registrar.h" |
| 24 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 24 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 25 #include "ipc/ipc_message.h" | 25 #include "ipc/ipc_message.h" |
| 26 | 26 |
| 27 class ChromeNetLog; |
| 27 class CommandLine; | 28 class CommandLine; |
| 28 class DebuggerWrapper; | 29 class DebuggerWrapper; |
| 29 class FilePath; | 30 class FilePath; |
| 30 class NotificationService; | 31 class NotificationService; |
| 31 class TabCloseableStateWatcher; | 32 class TabCloseableStateWatcher; |
| 32 | 33 |
| 33 // Real implementation of BrowserProcess that creates and returns the services. | 34 // Real implementation of BrowserProcess that creates and returns the services. |
| 34 class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { | 35 class BrowserProcessImpl : public BrowserProcess, public NonThreadSafe { |
| 35 public: | 36 public: |
| 36 explicit BrowserProcessImpl(const CommandLine& command_line); | 37 explicit BrowserProcessImpl(const CommandLine& command_line); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // Runs on the file thread and stats the inspector's directory, filling in | 205 // Runs on the file thread and stats the inspector's directory, filling in |
| 205 // have_inspector_files_ with the result. | 206 // have_inspector_files_ with the result. |
| 206 void DoInspectorFilesCheck(); | 207 void DoInspectorFilesCheck(); |
| 207 // Our best estimate about the existence of the inspector directory. | 208 // Our best estimate about the existence of the inspector directory. |
| 208 bool have_inspector_files_; | 209 bool have_inspector_files_; |
| 209 | 210 |
| 210 // Ensures that the observers of plugin/print disable/enable state | 211 // Ensures that the observers of plugin/print disable/enable state |
| 211 // notifications are properly added and removed. | 212 // notifications are properly added and removed. |
| 212 PrefChangeRegistrar pref_change_registrar_; | 213 PrefChangeRegistrar pref_change_registrar_; |
| 213 | 214 |
| 215 // Lives here so can safely log events on shutdown. |
| 216 scoped_ptr<ChromeNetLog> net_log_; |
| 217 |
| 214 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 218 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| 215 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; | 219 base::RepeatingTimer<BrowserProcessImpl> autoupdate_timer_; |
| 216 | 220 |
| 217 // Gets called by autoupdate timer to see if browser needs restart and can be | 221 // Gets called by autoupdate timer to see if browser needs restart and can be |
| 218 // restarted, and if that's the case, restarts the browser. | 222 // restarted, and if that's the case, restarts the browser. |
| 219 void OnAutoupdateTimer(); | 223 void OnAutoupdateTimer(); |
| 220 bool CanAutorestartForUpdate() const; | 224 bool CanAutorestartForUpdate() const; |
| 221 void RestartPersistentInstance(); | 225 void RestartPersistentInstance(); |
| 222 #endif // defined(OS_WIN) || defined(OS_LINUX) | 226 #endif // defined(OS_WIN) || defined(OS_LINUX) |
| 223 | 227 |
| 224 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 228 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
| 225 }; | 229 }; |
| 226 | 230 |
| 227 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 231 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
| OLD | NEW |