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