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

Side by Side Diff: content/browser/audio_device_thread.h

Issue 2443573003: Factor out AudioOutputDelegate from AudioRendererHost. (Closed)
Patch Set: . 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
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/audio_device_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #ifndef CONTENT_BROWSER_AUDIO_DEVICE_THREAD_H_
Avi (use Gerrit) 2016/12/02 15:27:49 blank line above
5 #define CONTENT_BROWSER_AUDIO_DEVICE_THREAD_H_
6
7 #include "base/threading/thread.h"
8 #include "content/common/content_export.h"
9
10 namespace content {
11
12 // This class encapulates the logic for the thread and task runners that the
13 // AudioManager and related classes run on. audio_task_runner and
14 // worker_task_runner should be called on the same thread as the
15 // AudioDeviceThread was constructed on.
16 class CONTENT_EXPORT AudioDeviceThread {
17 public:
18 // Constructs and starts the thread.
19 AudioDeviceThread();
20
21 scoped_refptr<base::SingleThreadTaskRunner> task_runner() {
22 #if defined(OS_MACOSX)
23 // On Mac audio task runner must belong to the main thread.
24 // See http://crbug.com/158170.
25 return base::ThreadTaskRunnerHandle::Get();
26 #else
27 return thread_.task_runner();
28 #endif // defined(OS_MACOSX)
29 }
30
31 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner() {
32 return thread_.task_runner();
33 }
34
35 private:
36 base::Thread thread_;
37
38 DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread);
39 };
40
41 } // namespace content
42 #endif // CONTENT_BROWSER_AUDIO_DEVICE_THREAD_H_
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/audio_device_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698