Index: content/browser/browser_main_loop.h |
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h |
index 7755d8c1630b9eed826c1fa79631a69ae6da6753..374f9487a9e97a243af5c5c565fef9c812138578 100644 |
--- a/content/browser/browser_main_loop.h |
+++ b/content/browser/browser_main_loop.h |
@@ -14,7 +14,6 @@ |
#include "build/build_config.h" |
#include "content/browser/browser_process_sub_thread.h" |
#include "content/public/browser/browser_main_runner.h" |
-#include "media/audio/audio_manager.h" |
#include "services/resource_coordinator/memory/coordinator/coordinator_impl.h" |
#if defined(USE_AURA) |
@@ -41,6 +40,7 @@ class DiscardableSharedMemoryManager; |
} |
namespace media { |
+class AudioManager; |
class AudioSystem; |
#if defined(OS_WIN) |
class SystemMessageWindowWin; |
@@ -194,6 +194,8 @@ class CONTENT_EXPORT BrowserMainLoop { |
void EndStartupTracing(); |
void CreateAudioManager(); |
+ void DestroyAudioManager(); |
+ |
bool UsingInProcessGpu() const; |
void InitializeMemoryManagementComponent(); |
@@ -295,9 +297,10 @@ class CONTENT_EXPORT BrowserMainLoop { |
// |user_input_monitor_| has to outlive |audio_manager_|, so declared first. |
std::unique_ptr<media::UserInputMonitor> user_input_monitor_; |
- // AudioThread needs to outlive |audio_manager_|. |
+ std::unique_ptr<media::AudioManager> audio_manager_; |
+ // |audio_thread_| must be stopped before |audio_manager_| is deleted so |
+ // that tasks referering to the |audio_manager_| cannot be posted. |
std::unique_ptr<AudioManagerThread> audio_thread_; |
- media::ScopedAudioManagerPtr audio_manager_; |
// Calls to |audio_system_| must not be posted to the audio thread if it |
// differs from the UI one. |
std::unique_ptr<media::AudioSystem> audio_system_; |