| 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 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 class SpeechRecognitionManagerImpl; | 82 class SpeechRecognitionManagerImpl; |
| 83 class StartupTaskRunner; | 83 class StartupTaskRunner; |
| 84 struct MainFunctionParams; | 84 struct MainFunctionParams; |
| 85 | 85 |
| 86 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
| 87 class ScreenOrientationDelegate; | 87 class ScreenOrientationDelegate; |
| 88 #elif defined(OS_WIN) | 88 #elif defined(OS_WIN) |
| 89 class ScreenOrientationDelegate; | 89 class ScreenOrientationDelegate; |
| 90 #endif | 90 #endif |
| 91 | 91 |
| 92 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 93 namespace internal { |
| 94 class GpuDataManagerVisualProxy; |
| 95 } |
| 96 #endif |
| 97 |
| 92 // Implements the main browser loop stages called from BrowserMainRunner. | 98 // Implements the main browser loop stages called from BrowserMainRunner. |
| 93 // See comments in browser_main_parts.h for additional info. | 99 // See comments in browser_main_parts.h for additional info. |
| 94 class CONTENT_EXPORT BrowserMainLoop { | 100 class CONTENT_EXPORT BrowserMainLoop { |
| 95 public: | 101 public: |
| 96 // Returns the current instance. This is used to get access to the getters | 102 // Returns the current instance. This is used to get access to the getters |
| 97 // that return objects which are owned by this class. | 103 // that return objects which are owned by this class. |
| 98 static BrowserMainLoop* GetInstance(); | 104 static BrowserMainLoop* GetInstance(); |
| 99 | 105 |
| 100 explicit BrowserMainLoop(const MainFunctionParams& parameters); | 106 explicit BrowserMainLoop(const MainFunctionParams& parameters); |
| 101 virtual ~BrowserMainLoop(); | 107 virtual ~BrowserMainLoop(); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // Members initialized in |InitializeMainThread()| --------------------------- | 256 // Members initialized in |InitializeMainThread()| --------------------------- |
| 251 // This must get destroyed before other threads that are created in |parts_|. | 257 // This must get destroyed before other threads that are created in |parts_|. |
| 252 std::unique_ptr<BrowserThreadImpl> main_thread_; | 258 std::unique_ptr<BrowserThreadImpl> main_thread_; |
| 253 | 259 |
| 254 // Members initialized in |CreateStartupTasks()| ----------------------------- | 260 // Members initialized in |CreateStartupTasks()| ----------------------------- |
| 255 std::unique_ptr<StartupTaskRunner> startup_task_runner_; | 261 std::unique_ptr<StartupTaskRunner> startup_task_runner_; |
| 256 | 262 |
| 257 // Members initialized in |PreCreateThreads()| ------------------------------- | 263 // Members initialized in |PreCreateThreads()| ------------------------------- |
| 258 // Torn down in ShutdownThreadsAndCleanUp. | 264 // Torn down in ShutdownThreadsAndCleanUp. |
| 259 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; | 265 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; |
| 266 #if defined(USE_X11) && !(OS_CHROMEOS) |
| 267 std::unique_ptr<internal::GpuDataManagerVisualProxy> |
| 268 gpu_data_manager_visual_proxy_; |
| 269 #endif |
| 260 | 270 |
| 261 // Members initialized in |CreateThreads()| ---------------------------------- | 271 // Members initialized in |CreateThreads()| ---------------------------------- |
| 262 std::unique_ptr<BrowserProcessSubThread> db_thread_; | 272 std::unique_ptr<BrowserProcessSubThread> db_thread_; |
| 263 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; | 273 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; |
| 264 std::unique_ptr<BrowserProcessSubThread> file_thread_; | 274 std::unique_ptr<BrowserProcessSubThread> file_thread_; |
| 265 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; | 275 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; |
| 266 std::unique_ptr<BrowserProcessSubThread> cache_thread_; | 276 std::unique_ptr<BrowserProcessSubThread> cache_thread_; |
| 267 std::unique_ptr<BrowserProcessSubThread> io_thread_; | 277 std::unique_ptr<BrowserProcessSubThread> io_thread_; |
| 268 | 278 |
| 269 // Members initialized in |BrowserThreadsStarted()| -------------------------- | 279 // Members initialized in |BrowserThreadsStarted()| -------------------------- |
| (...skipping 28 matching lines...) Expand all Loading... |
| 298 scoped_refptr<SaveFileManager> save_file_manager_; | 308 scoped_refptr<SaveFileManager> save_file_manager_; |
| 299 | 309 |
| 300 // DO NOT add members here. Add them to the right categories above. | 310 // DO NOT add members here. Add them to the right categories above. |
| 301 | 311 |
| 302 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 312 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
| 303 }; | 313 }; |
| 304 | 314 |
| 305 } // namespace content | 315 } // namespace content |
| 306 | 316 |
| 307 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 317 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
| OLD | NEW |