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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "content/browser/browser_process_sub_thread.h" | 15 #include "content/browser/browser_process_sub_thread.h" |
16 #include "content/public/browser/browser_main_runner.h" | 16 #include "content/public/browser/browser_main_runner.h" |
17 #include "media/audio/audio_manager.h" | 17 #include "media/audio/audio_manager.h" |
18 | 18 |
19 #if defined(USE_AURA) | 19 #if defined(USE_AURA) |
20 namespace aura { | 20 namespace aura { |
21 class Env; | 21 class Env; |
22 } | 22 } |
23 #endif | 23 #endif |
24 | 24 |
25 namespace base { | 25 namespace base { |
26 class CommandLine; | 26 class CommandLine; |
27 class FilePath; | 27 class FilePath; |
28 class HighResolutionTimerManager; | 28 class HighResolutionTimerManager; |
29 class MemoryPressureMonitor; | |
29 class MessageLoop; | 30 class MessageLoop; |
30 class PowerMonitor; | 31 class PowerMonitor; |
32 class SingleThreadTaskRunner; | |
31 class SystemMonitor; | 33 class SystemMonitor; |
32 class MemoryPressureMonitor; | |
33 namespace trace_event { | 34 namespace trace_event { |
34 class TraceEventSystemStatsMonitor; | 35 class TraceEventSystemStatsMonitor; |
35 } // namespace trace_event | 36 } // namespace trace_event |
36 } // namespace base | 37 } // namespace base |
37 | 38 |
38 namespace device { | 39 namespace device { |
39 class TimeZoneMonitor; | 40 class TimeZoneMonitor; |
40 } | 41 } |
41 | 42 |
42 namespace media { | 43 namespace media { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
265 | 266 |
266 // Members initialized in |PreCreateThreads()| ------------------------------- | 267 // Members initialized in |PreCreateThreads()| ------------------------------- |
267 // Torn down in ShutdownThreadsAndCleanUp. | 268 // Torn down in ShutdownThreadsAndCleanUp. |
268 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; | 269 std::unique_ptr<base::MemoryPressureMonitor> memory_pressure_monitor_; |
269 #if defined(USE_X11) && !(OS_CHROMEOS) | 270 #if defined(USE_X11) && !(OS_CHROMEOS) |
270 std::unique_ptr<internal::GpuDataManagerVisualProxy> | 271 std::unique_ptr<internal::GpuDataManagerVisualProxy> |
271 gpu_data_manager_visual_proxy_; | 272 gpu_data_manager_visual_proxy_; |
272 #endif | 273 #endif |
273 | 274 |
274 // Members initialized in |CreateThreads()| ---------------------------------- | 275 // Members initialized in |CreateThreads()| ---------------------------------- |
275 std::unique_ptr<BrowserProcessSubThread> db_thread_; | 276 std::unique_ptr<BrowserProcessSubThread> db_thread_; |
Avi (use Gerrit)
2016/11/08 16:16:15
Can you add commentary to this block as to when th
gab
2016/11/08 20:40:44
Done.
| |
276 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; | 277 std::unique_ptr<BrowserProcessSubThread> file_user_blocking_thread_; |
277 std::unique_ptr<BrowserProcessSubThread> file_thread_; | 278 std::unique_ptr<BrowserProcessSubThread> file_thread_; |
278 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; | 279 std::unique_ptr<BrowserProcessSubThread> process_launcher_thread_; |
279 std::unique_ptr<BrowserProcessSubThread> cache_thread_; | 280 std::unique_ptr<BrowserProcessSubThread> cache_thread_; |
281 scoped_refptr<base::SingleThreadTaskRunner> db_task_runner_; | |
282 scoped_refptr<base::SingleThreadTaskRunner> file_user_blocking_task_runner_; | |
283 scoped_refptr<base::SingleThreadTaskRunner> file_task_runner_; | |
284 scoped_refptr<base::SingleThreadTaskRunner> process_launcher_task_runner_; | |
285 scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner_; | |
286 // The IO thread is never redirected to TaskScheduler at this point. | |
280 std::unique_ptr<BrowserProcessSubThread> io_thread_; | 287 std::unique_ptr<BrowserProcessSubThread> io_thread_; |
281 | 288 |
282 // Members initialized in |BrowserThreadsStarted()| -------------------------- | 289 // Members initialized in |BrowserThreadsStarted()| -------------------------- |
283 std::unique_ptr<base::Thread> indexed_db_thread_; | 290 std::unique_ptr<base::Thread> indexed_db_thread_; |
284 std::unique_ptr<ServiceManagerContext> service_manager_context_; | 291 std::unique_ptr<ServiceManagerContext> service_manager_context_; |
285 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; | 292 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; |
286 | 293 |
287 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first. | 294 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first. |
288 std::unique_ptr<media::UserInputMonitor> user_input_monitor_; | 295 std::unique_ptr<media::UserInputMonitor> user_input_monitor_; |
289 // AudioThread needs to outlive |audio_manager_|. | 296 // AudioThread needs to outlive |audio_manager_|. |
(...skipping 21 matching lines...) Expand all Loading... | |
311 scoped_refptr<SaveFileManager> save_file_manager_; | 318 scoped_refptr<SaveFileManager> save_file_manager_; |
312 | 319 |
313 // DO NOT add members here. Add them to the right categories above. | 320 // DO NOT add members here. Add them to the right categories above. |
314 | 321 |
315 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 322 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
316 }; | 323 }; |
317 | 324 |
318 } // namespace content | 325 } // namespace content |
319 | 326 |
320 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 327 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |