summaryrefslogtreecommitdiff
path: root/chromium/content/browser/audio_manager_thread.cc
blob: 54263bb9bdda06950f702539b5542b640fb61897 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/audio_manager_thread.h"

#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"

namespace content {

AudioManagerThread::AudioManagerThread() : thread_("AudioThread") {
#if defined(OS_WIN)
  thread_.init_com_with_mta(true);
#endif
  CHECK(thread_.Start());

#if defined(OS_MACOSX)
  // On Mac, the audio task runner must belong to the main thread.
  // See http://crbug.com/158170.
  task_runner_ = base::ThreadTaskRunnerHandle::Get();
#else
  task_runner_ = thread_.task_runner();
#endif
}

AudioManagerThread::~AudioManagerThread() {}

}  // namespace content