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/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/timer/timer.h" | 12 #include "base/timer/timer.h" |
13 #include "content/browser/browser_process_sub_thread.h" | 13 #include "content/browser/browser_process_sub_thread.h" |
14 #include "content/public/browser/browser_main_runner.h" | 14 #include "content/public/browser/browser_main_runner.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class CommandLine; | 17 class CommandLine; |
18 class FilePath; | 18 class FilePath; |
19 class HighResolutionTimerManager; | 19 class HighResolutionTimerManager; |
20 class MessageLoop; | 20 class MessageLoop; |
21 class PowerMonitor; | 21 class PowerMonitor; |
22 class SystemMonitor; | 22 class SystemMonitor; |
23 #if defined(OS_CHROMEOS) | |
Charlie Reis
2014/12/15 21:52:09
This belongs with the OS-specific blocks below.
Mr4D (OOO till 08-26)
2014/12/15 22:21:46
Note: base::MemoryPressureObserverChromeOS.
The O
Charlie Reis
2014/12/15 22:50:26
Ah, no, I missed the base:: part. Apologies!
| |
24 class MemoryPressureObserverChromeOS; | |
25 #endif | |
23 namespace debug { | 26 namespace debug { |
24 class TraceMemoryController; | 27 class TraceMemoryController; |
25 class TraceEventSystemStatsMonitor; | 28 class TraceEventSystemStatsMonitor; |
26 } // namespace debug | 29 } // namespace debug |
27 } // namespace base | 30 } // namespace base |
28 | 31 |
29 namespace media { | 32 namespace media { |
30 class AudioManager; | 33 class AudioManager; |
31 class MidiManager; | 34 class MidiManager; |
32 class UserInputMonitor; | 35 class UserInputMonitor; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 return startup_trace_file_; | 111 return startup_trace_file_; |
109 } | 112 } |
110 | 113 |
111 void StopStartupTracingTimer(); | 114 void StopStartupTracingTimer(); |
112 | 115 |
113 #if defined(OS_MACOSX) && !defined(OS_IOS) | 116 #if defined(OS_MACOSX) && !defined(OS_IOS) |
114 DeviceMonitorMac* device_monitor_mac() const { | 117 DeviceMonitorMac* device_monitor_mac() const { |
115 return device_monitor_mac_.get(); | 118 return device_monitor_mac_.get(); |
116 } | 119 } |
117 #endif | 120 #endif |
121 #if defined(OS_CHROMEOS) | |
122 // Return the MemoryPressureObserver which might be NULL. | |
123 base::MemoryPressureObserverChromeOS* memory_pressure_observer() { | |
124 return memory_pressure_observer_.get(); | |
125 } | |
126 #endif | |
118 | 127 |
119 private: | 128 private: |
120 class MemoryObserver; | 129 class MemoryObserver; |
121 // For ShutdownThreadsAndCleanUp. | 130 // For ShutdownThreadsAndCleanUp. |
122 friend class BrowserShutdownImpl; | 131 friend class BrowserShutdownImpl; |
123 | 132 |
124 void InitializeMainThread(); | 133 void InitializeMainThread(); |
125 | 134 |
126 // Called just before creating the threads | 135 // Called just before creating the threads |
127 int PreCreateThreads(); | 136 int PreCreateThreads(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 174 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
166 #elif defined(USE_UDEV) | 175 #elif defined(USE_UDEV) |
167 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | 176 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; |
168 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 177 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
169 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; | 178 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; |
170 #endif | 179 #endif |
171 #if defined(OS_ANDROID) | 180 #if defined(OS_ANDROID) |
172 // Android implementation of ScreenOrientationDelegate | 181 // Android implementation of ScreenOrientationDelegate |
173 scoped_ptr<ScreenOrientationDelegate> screen_orientation_delegate_; | 182 scoped_ptr<ScreenOrientationDelegate> screen_orientation_delegate_; |
174 #endif | 183 #endif |
184 #if defined(OS_CHROMEOS) | |
185 scoped_ptr<base::MemoryPressureObserverChromeOS> memory_pressure_observer_; | |
186 #endif | |
175 // The startup task runner is created by CreateStartupTasks() | 187 // The startup task runner is created by CreateStartupTasks() |
176 scoped_ptr<StartupTaskRunner> startup_task_runner_; | 188 scoped_ptr<StartupTaskRunner> startup_task_runner_; |
177 | 189 |
178 // Destroy parts_ before main_message_loop_ (required) and before other | 190 // Destroy parts_ before main_message_loop_ (required) and before other |
179 // classes constructed in content (but after main_thread_). | 191 // classes constructed in content (but after main_thread_). |
180 scoped_ptr<BrowserMainParts> parts_; | 192 scoped_ptr<BrowserMainParts> parts_; |
181 | 193 |
182 // Members initialized in |InitializeMainThread()| --------------------------- | 194 // Members initialized in |InitializeMainThread()| --------------------------- |
183 // This must get destroyed before other threads that are created in parts_. | 195 // This must get destroyed before other threads that are created in parts_. |
184 scoped_ptr<BrowserThreadImpl> main_thread_; | 196 scoped_ptr<BrowserThreadImpl> main_thread_; |
(...skipping 20 matching lines...) Expand all Loading... | |
205 | 217 |
206 // This timer initiates trace file saving. | 218 // This timer initiates trace file saving. |
207 base::OneShotTimer<BrowserMainLoop> startup_trace_timer_; | 219 base::OneShotTimer<BrowserMainLoop> startup_trace_timer_; |
208 | 220 |
209 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 221 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
210 }; | 222 }; |
211 | 223 |
212 } // namespace content | 224 } // namespace content |
213 | 225 |
214 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 226 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |