OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/audio_manager_thread.h" | |
6 | |
7 #include "base/threading/thread_task_runner_handle.h" | |
8 #include "build/build_config.h" | |
9 | |
10 namespace content { | |
11 | |
12 AudioManagerThread::AudioManagerThread() : thread_("AudioThread") { | |
13 #if defined(OS_WIN) | |
14 thread_.init_com_with_mta(true); | |
15 #endif | |
16 CHECK(thread_.Start()); | |
17 | |
18 #if defined(OS_MACOSX) | |
19 // On Mac, the audio task runner must belong to the main thread. | |
20 // See http://crbug.com/158170. | |
21 task_runner_ = base::ThreadTaskRunnerHandle::Get(); | |
22 #else | |
23 task_runner_ = thread_.task_runner(); | |
24 #endif | |
25 } | |
26 | |
27 AudioManagerThread::~AudioManagerThread() {} | |
28 | |
29 } // namespace content | |
OLD | NEW |