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

Unified Diff: content/browser/audio_device_thread.h

Issue 2443573003: Factor out AudioOutputDelegate from AudioRendererHost. (Closed)
Patch Set: Final comments addressed. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/audio_device_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/audio_device_thread.h
diff --git a/content/browser/audio_device_thread.h b/content/browser/audio_device_thread.h
new file mode 100644
index 0000000000000000000000000000000000000000..1547686e1d6e6f1fcb415e212ccbc99cbee0143d
--- /dev/null
+++ b/content/browser/audio_device_thread.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef CONTENT_BROWSER_AUDIO_DEVICE_THREAD_H_
+#define CONTENT_BROWSER_AUDIO_DEVICE_THREAD_H_
+
+#include "base/threading/thread.h"
+#include "content/common/content_export.h"
+
+namespace content {
+
+// This class encapulates the logic for the thread and task runners that the
+// AudioManager and related classes run on. audio_task_runner and
+// worker_task_runner should be called on the same thread as the
+// AudioDeviceThread was constructed on.
+class CONTENT_EXPORT AudioDeviceThread {
+ public:
+ // Constructs and starts the thread.
+ AudioDeviceThread();
+
+ scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner();
+
+ scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner() {
+ return thread_.task_runner();
+ }
+
+ private:
+ base::Thread thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(AudioDeviceThread);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_AUDIO_DEVICE_THREAD_H_
« 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