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" |
(...skipping 22 matching lines...) Expand all Loading... |
33 namespace trace_event { | 33 namespace trace_event { |
34 class TraceEventSystemStatsMonitor; | 34 class TraceEventSystemStatsMonitor; |
35 } // namespace trace_event | 35 } // namespace trace_event |
36 } // namespace base | 36 } // namespace base |
37 | 37 |
38 namespace discardable_memory { | 38 namespace discardable_memory { |
39 class DiscardableSharedMemoryManager; | 39 class DiscardableSharedMemoryManager; |
40 } | 40 } |
41 | 41 |
42 namespace media { | 42 namespace media { |
| 43 class AudioSystem; |
43 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
44 class SystemMessageWindowWin; | 45 class SystemMessageWindowWin; |
45 #elif defined(OS_LINUX) && defined(USE_UDEV) | 46 #elif defined(OS_LINUX) && defined(USE_UDEV) |
46 class DeviceMonitorLinux; | 47 class DeviceMonitorLinux; |
47 #endif | 48 #endif |
48 class UserInputMonitor; | 49 class UserInputMonitor; |
49 #if defined(OS_MACOSX) | 50 #if defined(OS_MACOSX) |
50 class DeviceMonitorMac; | 51 class DeviceMonitorMac; |
51 #endif | 52 #endif |
52 } // namespace media | 53 } // namespace media |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Perform the default message loop run logic. | 131 // Perform the default message loop run logic. |
131 void RunMainMessageLoopParts(); | 132 void RunMainMessageLoopParts(); |
132 | 133 |
133 // Performs the shutdown sequence, starting with PostMainMessageLoopRun | 134 // Performs the shutdown sequence, starting with PostMainMessageLoopRun |
134 // through stopping threads to PostDestroyThreads. | 135 // through stopping threads to PostDestroyThreads. |
135 void ShutdownThreadsAndCleanUp(); | 136 void ShutdownThreadsAndCleanUp(); |
136 | 137 |
137 int GetResultCode() const { return result_code_; } | 138 int GetResultCode() const { return result_code_; } |
138 | 139 |
139 media::AudioManager* audio_manager() const { return audio_manager_.get(); } | 140 media::AudioManager* audio_manager() const { return audio_manager_.get(); } |
| 141 media::AudioSystem* audio_system() const { return audio_system_.get(); } |
140 MediaStreamManager* media_stream_manager() const { | 142 MediaStreamManager* media_stream_manager() const { |
141 return media_stream_manager_.get(); | 143 return media_stream_manager_.get(); |
142 } | 144 } |
143 media::UserInputMonitor* user_input_monitor() const { | 145 media::UserInputMonitor* user_input_monitor() const { |
144 return user_input_monitor_.get(); | 146 return user_input_monitor_.get(); |
145 } | 147 } |
146 discardable_memory::DiscardableSharedMemoryManager* | 148 discardable_memory::DiscardableSharedMemoryManager* |
147 discardable_shared_memory_manager() const { | 149 discardable_shared_memory_manager() const { |
148 return discardable_shared_memory_manager_.get(); | 150 return discardable_shared_memory_manager_.get(); |
149 } | 151 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // Members initialized in |BrowserThreadsStarted()| -------------------------- | 290 // Members initialized in |BrowserThreadsStarted()| -------------------------- |
289 std::unique_ptr<base::Thread> indexed_db_thread_; | 291 std::unique_ptr<base::Thread> indexed_db_thread_; |
290 std::unique_ptr<ServiceManagerContext> service_manager_context_; | 292 std::unique_ptr<ServiceManagerContext> service_manager_context_; |
291 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; | 293 std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_; |
292 | 294 |
293 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first. | 295 // |user_input_monitor_| has to outlive |audio_manager_|, so declared first. |
294 std::unique_ptr<media::UserInputMonitor> user_input_monitor_; | 296 std::unique_ptr<media::UserInputMonitor> user_input_monitor_; |
295 // AudioThread needs to outlive |audio_manager_|. | 297 // AudioThread needs to outlive |audio_manager_|. |
296 std::unique_ptr<AudioManagerThread> audio_thread_; | 298 std::unique_ptr<AudioManagerThread> audio_thread_; |
297 media::ScopedAudioManagerPtr audio_manager_; | 299 media::ScopedAudioManagerPtr audio_manager_; |
| 300 // Calls to |audio_system_| must not be posted to the audio thread if it |
| 301 // differs from the UI one. |
| 302 std::unique_ptr<media::AudioSystem> audio_system_; |
298 | 303 |
299 std::unique_ptr<midi::MidiService> midi_service_; | 304 std::unique_ptr<midi::MidiService> midi_service_; |
300 | 305 |
301 #if defined(OS_WIN) | 306 #if defined(OS_WIN) |
302 std::unique_ptr<media::SystemMessageWindowWin> system_message_window_; | 307 std::unique_ptr<media::SystemMessageWindowWin> system_message_window_; |
303 #elif defined(OS_LINUX) && defined(USE_UDEV) | 308 #elif defined(OS_LINUX) && defined(USE_UDEV) |
304 std::unique_ptr<media::DeviceMonitorLinux> device_monitor_linux_; | 309 std::unique_ptr<media::DeviceMonitorLinux> device_monitor_linux_; |
305 #elif defined(OS_MACOSX) && !defined(OS_IOS) | 310 #elif defined(OS_MACOSX) && !defined(OS_IOS) |
306 std::unique_ptr<media::DeviceMonitorMac> device_monitor_mac_; | 311 std::unique_ptr<media::DeviceMonitorMac> device_monitor_mac_; |
307 #endif | 312 #endif |
(...skipping 10 matching lines...) Expand all Loading... |
318 scoped_refptr<SaveFileManager> save_file_manager_; | 323 scoped_refptr<SaveFileManager> save_file_manager_; |
319 | 324 |
320 // DO NOT add members here. Add them to the right categories above. | 325 // DO NOT add members here. Add them to the right categories above. |
321 | 326 |
322 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 327 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
323 }; | 328 }; |
324 | 329 |
325 } // namespace content | 330 } // namespace content |
326 | 331 |
327 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 332 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |