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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "content/browser/browser_process_sub_thread.h" | 11 #include "content/browser/browser_process_sub_thread.h" |
12 #include "content/public/browser/browser_main_runner.h" | 12 #include "content/public/browser/browser_main_runner.h" |
13 | 13 |
| 14 namespace base { |
14 class CommandLine; | 15 class CommandLine; |
15 | |
16 namespace base { | |
17 class FilePath; | 16 class FilePath; |
18 class HighResolutionTimerManager; | 17 class HighResolutionTimerManager; |
19 class MessageLoop; | 18 class MessageLoop; |
20 class PowerMonitor; | 19 class PowerMonitor; |
21 class SystemMonitor; | 20 class SystemMonitor; |
22 namespace debug { | 21 namespace debug { |
23 class TraceMemoryController; | 22 class TraceMemoryController; |
24 class TraceEventSystemStatsMonitor; | 23 class TraceEventSystemStatsMonitor; |
25 } // namespace debug | 24 } // namespace debug |
26 } // namespace base | 25 } // namespace base |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Create all secondary threads. | 119 // Create all secondary threads. |
121 int CreateThreads(); | 120 int CreateThreads(); |
122 | 121 |
123 // Called right after the browser threads have been started. | 122 // Called right after the browser threads have been started. |
124 int BrowserThreadsStarted(); | 123 int BrowserThreadsStarted(); |
125 | 124 |
126 int PreMainMessageLoopRun(); | 125 int PreMainMessageLoopRun(); |
127 | 126 |
128 void MainMessageLoopRun(); | 127 void MainMessageLoopRun(); |
129 | 128 |
130 void InitStartupTracing(const CommandLine& command_line); | 129 void InitStartupTracing(const base::CommandLine& command_line); |
131 void EndStartupTracing(const base::FilePath& trace_file); | 130 void EndStartupTracing(const base::FilePath& trace_file); |
132 | 131 |
133 // Members initialized on construction --------------------------------------- | 132 // Members initialized on construction --------------------------------------- |
134 const MainFunctionParams& parameters_; | 133 const MainFunctionParams& parameters_; |
135 const CommandLine& parsed_command_line_; | 134 const base::CommandLine& parsed_command_line_; |
136 int result_code_; | 135 int result_code_; |
137 // True if the non-UI threads were created. | 136 // True if the non-UI threads were created. |
138 bool created_threads_; | 137 bool created_threads_; |
139 | 138 |
140 // Members initialized in |MainMessageLoopStart()| --------------------------- | 139 // Members initialized in |MainMessageLoopStart()| --------------------------- |
141 scoped_ptr<base::MessageLoop> main_message_loop_; | 140 scoped_ptr<base::MessageLoop> main_message_loop_; |
142 scoped_ptr<base::SystemMonitor> system_monitor_; | 141 scoped_ptr<base::SystemMonitor> system_monitor_; |
143 scoped_ptr<base::PowerMonitor> power_monitor_; | 142 scoped_ptr<base::PowerMonitor> power_monitor_; |
144 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; | 143 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; |
145 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 144 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 scoped_ptr<base::debug::TraceEventSystemStatsMonitor> system_stats_monitor_; | 185 scoped_ptr<base::debug::TraceEventSystemStatsMonitor> system_stats_monitor_; |
187 | 186 |
188 bool is_tracing_startup_; | 187 bool is_tracing_startup_; |
189 | 188 |
190 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 189 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
191 }; | 190 }; |
192 | 191 |
193 } // namespace content | 192 } // namespace content |
194 | 193 |
195 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 194 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |