Chromium Code Reviews| Index: content/browser/audio_device_thread.cc |
| diff --git a/content/browser/audio_device_thread.cc b/content/browser/audio_device_thread.cc |
| index 21cceb5d99f3fb28b8b08568922ec5a3e55f312e..4784e9f180711e290eeb462f9bb4d677b072ec36 100644 |
| --- a/content/browser/audio_device_thread.cc |
| +++ b/content/browser/audio_device_thread.cc |
| @@ -2,27 +2,28 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include "content/browser/audio_device_thread.h" |
| + |
| #include "base/threading/thread_task_runner_handle.h" |
| #include "build/build_config.h" |
| -#include "content/browser/audio_device_thread.h" |
| namespace content { |
| -scoped_refptr<base::SingleThreadTaskRunner> AudioDeviceThread::GetTaskRunner() { |
| -#if defined(OS_MACOSX) |
| - // On Mac audio task runner must belong to the main thread. |
| - // See http://crbug.com/158170. |
| - return base::ThreadTaskRunnerHandle::Get(); |
| -#else |
| - return thread_.task_runner(); |
| -#endif // defined(OS_MACOSX) |
| - } |
| - |
| AudioDeviceThread::AudioDeviceThread() : thread_("AudioThread") { |
| #if defined(OS_WIN) |
| thread_.init_com_with_mta(true); |
| #endif |
| CHECK(thread_.Start()); |
| + |
| +#if defined(OS_MACOSX) |
| + // On Mac audio task runner must belong to the main thread. |
|
Avi (use Gerrit)
2016/12/13 01:36:11
Grammar? "On the Mac, the audio ..."
|
| + // See http://crbug.com/158170. |
| + task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
| +#else |
| + task_runner_ = thread_.task_runner(); |
| +#endif |
| } |
| +AudioDeviceThread::~AudioDeviceThread() {} |
| + |
| } // namespace content |