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 #include "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 #include "content/browser/gpu/gpu_data_manager_impl.h" | 62 #include "content/browser/gpu/gpu_data_manager_impl.h" |
63 #include "content/browser/gpu/gpu_process_host.h" | 63 #include "content/browser/gpu/gpu_process_host.h" |
64 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 64 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
65 #include "content/browser/gpu/shader_cache_factory.h" | 65 #include "content/browser/gpu/shader_cache_factory.h" |
66 #include "content/browser/histogram_synchronizer.h" | 66 #include "content/browser/histogram_synchronizer.h" |
67 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 67 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
68 #include "content/browser/loader_delegate_impl.h" | 68 #include "content/browser/loader_delegate_impl.h" |
69 #include "content/browser/media/media_internals.h" | 69 #include "content/browser/media/media_internals.h" |
70 #include "content/browser/memory/memory_coordinator_impl.h" | 70 #include "content/browser/memory/memory_coordinator_impl.h" |
71 #include "content/browser/net/browser_online_state_observer.h" | 71 #include "content/browser/net/browser_online_state_observer.h" |
| 72 #include "content/browser/renderer_host/media/audio_debug_file_writer.h" |
72 #include "content/browser/renderer_host/media/media_stream_manager.h" | 73 #include "content/browser/renderer_host/media/media_stream_manager.h" |
73 #include "content/browser/renderer_host/render_process_host_impl.h" | 74 #include "content/browser/renderer_host/render_process_host_impl.h" |
74 #include "content/browser/service_manager/service_manager_context.h" | 75 #include "content/browser/service_manager/service_manager_context.h" |
75 #include "content/browser/speech/speech_recognition_manager_impl.h" | 76 #include "content/browser/speech/speech_recognition_manager_impl.h" |
76 #include "content/browser/startup_task_runner.h" | 77 #include "content/browser/startup_task_runner.h" |
77 #include "content/browser/utility_process_host_impl.h" | 78 #include "content/browser/utility_process_host_impl.h" |
78 #include "content/browser/webui/content_web_ui_controller_factory.h" | 79 #include "content/browser/webui/content_web_ui_controller_factory.h" |
79 #include "content/browser/webui/url_data_manager.h" | 80 #include "content/browser/webui/url_data_manager.h" |
80 #include "content/common/content_switches_internal.h" | 81 #include "content/common/content_switches_internal.h" |
81 #include "content/common/host_shared_bitmap_manager.h" | 82 #include "content/common/host_shared_bitmap_manager.h" |
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1781 DCHECK(!audio_thread_); | 1782 DCHECK(!audio_thread_); |
1782 DCHECK(!audio_manager_); | 1783 DCHECK(!audio_manager_); |
1783 | 1784 |
1784 audio_manager_ = GetContentClient()->browser()->CreateAudioManager( | 1785 audio_manager_ = GetContentClient()->browser()->CreateAudioManager( |
1785 MediaInternals::GetInstance()); | 1786 MediaInternals::GetInstance()); |
1786 if (!audio_manager_) { | 1787 if (!audio_manager_) { |
1787 audio_thread_ = base::MakeUnique<AudioManagerThread>(); | 1788 audio_thread_ = base::MakeUnique<AudioManagerThread>(); |
1788 audio_manager_ = media::AudioManager::Create( | 1789 audio_manager_ = media::AudioManager::Create( |
1789 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), | 1790 audio_thread_->task_runner(), audio_thread_->worker_task_runner(), |
1790 MediaInternals::GetInstance()); | 1791 MediaInternals::GetInstance()); |
| 1792 #if BUILDFLAG(ENABLE_WEBRTC) |
| 1793 // AudioManager is deleted on the audio thread, so it's safe to post |
| 1794 // unretained. |
| 1795 audio_manager_->GetTaskRunner()->PostTask( |
| 1796 FROM_HERE, |
| 1797 base::Bind(&media::AudioManager::InitializeOutputDebugRecording, |
| 1798 base::Unretained(audio_manager_.get()), |
| 1799 base::Bind(&AudioDebugFileWriter::Create))); |
| 1800 #endif |
1791 } | 1801 } |
1792 CHECK(audio_manager_); | 1802 CHECK(audio_manager_); |
1793 } | 1803 } |
1794 | 1804 |
1795 } // namespace content | 1805 } // namespace content |
OLD | NEW |