Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: content/browser/browser_main_loop.cc

Issue 2558303004: Cleanup AudioDeviceThread to avoid accidental misuse. (Closed)
Patch Set: Rename to AudioManagerThread. Fix tests. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 #include "base/time/time.h" 41 #include "base/time/time.h"
42 #include "base/timer/hi_res_timer_manager.h" 42 #include "base/timer/hi_res_timer_manager.h"
43 #include "base/trace_event/memory_dump_manager.h" 43 #include "base/trace_event/memory_dump_manager.h"
44 #include "base/trace_event/trace_event.h" 44 #include "base/trace_event/trace_event.h"
45 #include "build/build_config.h" 45 #include "build/build_config.h"
46 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h" 46 #include "components/discardable_memory/service/discardable_shared_memory_manage r.h"
47 #include "components/tracing/browser/trace_config_file.h" 47 #include "components/tracing/browser/trace_config_file.h"
48 #include "components/tracing/common/process_metrics_memory_dump_provider.h" 48 #include "components/tracing/common/process_metrics_memory_dump_provider.h"
49 #include "components/tracing/common/trace_to_console.h" 49 #include "components/tracing/common/trace_to_console.h"
50 #include "components/tracing/common/tracing_switches.h" 50 #include "components/tracing/common/tracing_switches.h"
51 #include "content/browser/audio_device_thread.h" 51 #include "content/browser/audio_manager_thread.h"
52 #include "content/browser/browser_thread_impl.h" 52 #include "content/browser/browser_thread_impl.h"
53 #include "content/browser/device_sensors/device_sensor_service.h" 53 #include "content/browser/device_sensors/device_sensor_service.h"
54 #include "content/browser/dom_storage/dom_storage_area.h" 54 #include "content/browser/dom_storage/dom_storage_area.h"
55 #include "content/browser/download/download_resource_handler.h" 55 #include "content/browser/download/download_resource_handler.h"
56 #include "content/browser/download/save_file_manager.h" 56 #include "content/browser/download/save_file_manager.h"
57 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 57 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
58 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 58 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
59 #include "content/browser/gpu/compositor_util.h" 59 #include "content/browser/gpu/compositor_util.h"
60 #include "content/browser/gpu/gpu_data_manager_impl.h" 60 #include "content/browser/gpu/gpu_data_manager_impl.h"
61 #include "content/browser/gpu/gpu_process_host.h" 61 #include "content/browser/gpu/gpu_process_host.h"
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); 1692 base::Bind(OnStoppedStartupTracing, startup_trace_file_)));
1693 } 1693 }
1694 1694
1695 void BrowserMainLoop::CreateAudioManager() { 1695 void BrowserMainLoop::CreateAudioManager() {
1696 DCHECK(!audio_thread_); 1696 DCHECK(!audio_thread_);
1697 DCHECK(!audio_manager_); 1697 DCHECK(!audio_manager_);
1698 1698
1699 audio_manager_ = GetContentClient()->browser()->CreateAudioManager( 1699 audio_manager_ = GetContentClient()->browser()->CreateAudioManager(
1700 MediaInternals::GetInstance()); 1700 MediaInternals::GetInstance());
1701 if (!audio_manager_) { 1701 if (!audio_manager_) {
1702 audio_thread_ = base::MakeUnique<AudioDeviceThread>(); 1702 audio_thread_ = base::MakeUnique<AudioManagerThread>();
1703 audio_manager_ = media::AudioManager::Create( 1703 audio_manager_ = media::AudioManager::Create(
1704 audio_thread_->GetTaskRunner(), audio_thread_->worker_task_runner(), 1704 audio_thread_->task_runner(), audio_thread_->worker_task_runner(),
1705 MediaInternals::GetInstance()); 1705 MediaInternals::GetInstance());
1706 } 1706 }
1707 CHECK(audio_manager_); 1707 CHECK(audio_manager_);
1708 } 1708 }
1709 1709
1710 } // namespace content 1710 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698