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 HighResolutionTimerManager; | 17 class HighResolutionTimerManager; |
18 class MessageLoop; | 18 class MessageLoop; |
19 class PowerMonitor; | 19 class PowerMonitor; |
20 class SystemMonitor; | 20 class SystemMonitor; |
21 namespace debug { | 21 namespace debug { |
22 class TraceMemoryController; | 22 class TraceMemoryController; |
23 } // namespace debug | 23 } // namespace debug |
24 } // namespace base | 24 } // namespace base |
25 | 25 |
26 namespace media { | 26 namespace media { |
27 class AudioManager; | 27 class AudioManager; |
28 class MIDIManager; | 28 class MIDIManager; |
29 class UserInputMonitor; | |
30 } // namespace media | 29 } // namespace media |
31 | 30 |
32 namespace net { | 31 namespace net { |
33 class NetworkChangeNotifier; | 32 class NetworkChangeNotifier; |
34 } // namespace net | 33 } // namespace net |
35 | 34 |
36 namespace content { | 35 namespace content { |
37 class AudioMirroringManager; | 36 class AudioMirroringManager; |
38 class BrowserMainParts; | 37 class BrowserMainParts; |
39 class BrowserOnlineStateObserver; | 38 class BrowserOnlineStateObserver; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 79 |
81 int GetResultCode() const { return result_code_; } | 80 int GetResultCode() const { return result_code_; } |
82 | 81 |
83 media::AudioManager* audio_manager() const { return audio_manager_.get(); } | 82 media::AudioManager* audio_manager() const { return audio_manager_.get(); } |
84 AudioMirroringManager* audio_mirroring_manager() const { | 83 AudioMirroringManager* audio_mirroring_manager() const { |
85 return audio_mirroring_manager_.get(); | 84 return audio_mirroring_manager_.get(); |
86 } | 85 } |
87 MediaStreamManager* media_stream_manager() const { | 86 MediaStreamManager* media_stream_manager() const { |
88 return media_stream_manager_.get(); | 87 return media_stream_manager_.get(); |
89 } | 88 } |
90 media::UserInputMonitor* user_input_monitor() const { | |
91 return user_input_monitor_.get(); | |
92 } | |
93 media::MIDIManager* midi_manager() const { return midi_manager_.get(); } | 89 media::MIDIManager* midi_manager() const { return midi_manager_.get(); } |
94 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } | 90 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } |
95 | 91 |
96 private: | 92 private: |
97 class MemoryObserver; | 93 class MemoryObserver; |
98 // For ShutdownThreadsAndCleanUp. | 94 // For ShutdownThreadsAndCleanUp. |
99 friend class BrowserShutdownImpl; | 95 friend class BrowserShutdownImpl; |
100 | 96 |
101 void InitializeMainThread(); | 97 void InitializeMainThread(); |
102 | 98 |
(...skipping 16 matching lines...) Expand all Loading... |
119 int result_code_; | 115 int result_code_; |
120 // True if the non-UI threads were created. | 116 // True if the non-UI threads were created. |
121 bool created_threads_; | 117 bool created_threads_; |
122 | 118 |
123 // Members initialized in |MainMessageLoopStart()| --------------------------- | 119 // Members initialized in |MainMessageLoopStart()| --------------------------- |
124 scoped_ptr<base::MessageLoop> main_message_loop_; | 120 scoped_ptr<base::MessageLoop> main_message_loop_; |
125 scoped_ptr<base::SystemMonitor> system_monitor_; | 121 scoped_ptr<base::SystemMonitor> system_monitor_; |
126 scoped_ptr<base::PowerMonitor> power_monitor_; | 122 scoped_ptr<base::PowerMonitor> power_monitor_; |
127 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; | 123 scoped_ptr<base::HighResolutionTimerManager> hi_res_timer_manager_; |
128 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 124 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
129 // user_input_monitor_ has to outlive audio_manager_, so declared first. | |
130 scoped_ptr<media::UserInputMonitor> user_input_monitor_; | |
131 scoped_ptr<media::AudioManager> audio_manager_; | 125 scoped_ptr<media::AudioManager> audio_manager_; |
132 scoped_ptr<media::MIDIManager> midi_manager_; | 126 scoped_ptr<media::MIDIManager> midi_manager_; |
133 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; | 127 scoped_ptr<AudioMirroringManager> audio_mirroring_manager_; |
134 scoped_ptr<MediaStreamManager> media_stream_manager_; | 128 scoped_ptr<MediaStreamManager> media_stream_manager_; |
135 // Per-process listener for online state changes. | 129 // Per-process listener for online state changes. |
136 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 130 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
137 #if defined(OS_WIN) | 131 #if defined(OS_WIN) |
138 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 132 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
139 #elif defined(OS_LINUX) | 133 #elif defined(OS_LINUX) |
140 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | 134 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; |
(...skipping 23 matching lines...) Expand all Loading... |
164 scoped_ptr<base::Thread> indexed_db_thread_; | 158 scoped_ptr<base::Thread> indexed_db_thread_; |
165 scoped_ptr<MemoryObserver> memory_observer_; | 159 scoped_ptr<MemoryObserver> memory_observer_; |
166 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; | 160 scoped_ptr<base::debug::TraceMemoryController> trace_memory_controller_; |
167 | 161 |
168 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 162 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
169 }; | 163 }; |
170 | 164 |
171 } // namespace content | 165 } // namespace content |
172 | 166 |
173 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 167 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |