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 class CommandLine; | 14 class CommandLine; |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 class FilePath; | 17 class FilePath; |
18 class HighResolutionTimerManager; | 18 class HighResolutionTimerManager; |
19 class MessageLoop; | 19 class MessageLoop; |
20 class PowerMonitor; | 20 class PowerMonitor; |
21 class SystemMonitor; | 21 class SystemMonitor; |
22 namespace debug { | 22 namespace debug { |
23 class TraceMemoryController; | 23 class TraceMemoryController; |
24 class TraceEventSystemStatsMonitor; | 24 class TraceEventSystemStatsMonitor; |
25 } // namespace debug | 25 } // namespace debug |
26 } // namespace base | 26 } // namespace base |
27 | 27 |
28 namespace media { | 28 namespace media { |
29 class AudioManager; | 29 class AudioManager; |
30 class MIDIManager; | 30 class MidiManager; |
31 class UserInputMonitor; | 31 class UserInputMonitor; |
32 } // namespace media | 32 } // namespace media |
33 | 33 |
34 namespace net { | 34 namespace net { |
35 class NetworkChangeNotifier; | 35 class NetworkChangeNotifier; |
36 } // namespace net | 36 } // namespace net |
37 | 37 |
38 namespace content { | 38 namespace content { |
39 class AudioMirroringManager; | 39 class AudioMirroringManager; |
40 class BrowserMainParts; | 40 class BrowserMainParts; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 media::AudioManager* audio_manager() const { return audio_manager_.get(); } | 89 media::AudioManager* audio_manager() const { return audio_manager_.get(); } |
90 AudioMirroringManager* audio_mirroring_manager() const { | 90 AudioMirroringManager* audio_mirroring_manager() const { |
91 return audio_mirroring_manager_.get(); | 91 return audio_mirroring_manager_.get(); |
92 } | 92 } |
93 MediaStreamManager* media_stream_manager() const { | 93 MediaStreamManager* media_stream_manager() const { |
94 return media_stream_manager_.get(); | 94 return media_stream_manager_.get(); |
95 } | 95 } |
96 media::UserInputMonitor* user_input_monitor() const { | 96 media::UserInputMonitor* user_input_monitor() const { |
97 return user_input_monitor_.get(); | 97 return user_input_monitor_.get(); |
98 } | 98 } |
99 media::MIDIManager* midi_manager() const { return midi_manager_.get(); } | 99 media::MidiManager* midi_manager() const { return midi_manager_.get(); } |
100 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } | 100 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } |
101 | 101 |
102 bool is_tracing_startup() const { return is_tracing_startup_; } | 102 bool is_tracing_startup() const { return is_tracing_startup_; } |
103 | 103 |
104 private: | 104 private: |
105 class MemoryObserver; | 105 class MemoryObserver; |
106 // For ShutdownThreadsAndCleanUp. | 106 // For ShutdownThreadsAndCleanUp. |
107 friend class BrowserShutdownImpl; | 107 friend class BrowserShutdownImpl; |
108 | 108 |
109 void InitializeMainThread(); | 109 void InitializeMainThread(); |
(...skipping 23 matching lines...) Expand all Loading... |
133 | 133 |
134 // Members initialized in |MainMessageLoopStart()| --------------------------- | 134 // Members initialized in |MainMessageLoopStart()| --------------------------- |
135 scoped_ptr<base::MessageLoop> main_message_loop_; | 135 scoped_ptr<base::MessageLoop> main_message_loop_; |
136 scoped_ptr<base::SystemMonitor> system_monitor_; | 136 scoped_ptr<base::SystemMonitor> system_monitor_; |
137 scoped_ptr<base::PowerMonitor> power_monitor_; | 137 scoped_ptr<base::PowerMonitor> power_monitor_; |
138 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; | 138 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; |
139 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 139 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
140 // user_input_monitor_ has to outlive audio_manager_, so declared first. | 140 // user_input_monitor_ has to outlive audio_manager_, so declared first. |
141 scoped_ptr<media::UserInputMonitor> user_input_monitor_; | 141 scoped_ptr<media::UserInputMonitor> user_input_monitor_; |
142 scoped_ptr<media::AudioManager> audio_manager_; | 142 scoped_ptr<media::AudioManager> audio_manager_; |
143 scoped_ptr<media::MIDIManager> midi_manager_; | 143 scoped_ptr<media::MidiManager> midi_manager_; |
144 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; | 144 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; |
145 scoped_ptr<MediaStreamManager> media_stream_manager_; | 145 scoped_ptr<MediaStreamManager> media_stream_manager_; |
146 // Per-process listener for online state changes. | 146 // Per-process listener for online state changes. |
147 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 147 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
148 #if defined(OS_WIN) | 148 #if defined(OS_WIN) |
149 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 149 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
150 #elif defined(USE_UDEV) | 150 #elif defined(USE_UDEV) |
151 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | 151 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; |
152 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 152 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
153 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; | 153 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; |
(...skipping 26 matching lines...) Expand all Loading... |
180 scoped_ptr<base::debug::TraceEventSystemStatsMonitor> system_stats_monitor_; | 180 scoped_ptr<base::debug::TraceEventSystemStatsMonitor> system_stats_monitor_; |
181 | 181 |
182 bool is_tracing_startup_; | 182 bool is_tracing_startup_; |
183 | 183 |
184 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 184 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
185 }; | 185 }; |
186 | 186 |
187 } // namespace content | 187 } // namespace content |
188 | 188 |
189 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 189 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |