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

Unified Diff: media/audio/audio_system.h

Issue 2697033006: Switching MediaStreamManager from using AudioManager to AudioSystem (Closed)
Patch Set: weak pointers removed Created 3 years, 9 months 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/renderer_host/media/video_capture_unittest.cc ('k') | media/audio/audio_system_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_system.h
diff --git a/media/audio/audio_system.h b/media/audio/audio_system.h
index 76319cc2eb75aa1f84c513f030ce9f6729c9e872..de05c69aff9472f5a91975199bb110810559d1f2 100644
--- a/media/audio/audio_system.h
+++ b/media/audio/audio_system.h
@@ -9,6 +9,10 @@
#include "media/base/audio_parameters.h"
#include "media/base/media_export.h"
+namespace base {
+class SingleThreadTaskRunner;
+}
+
namespace media {
class AudioManager;
@@ -17,7 +21,9 @@ class AudioManager;
// to Mojo audio service.
class MEDIA_EXPORT AudioSystem {
public:
- // Replies are asynchronously sent to the thread the call is issued on.
+ // Replies are asynchronously sent from audio system thread to the thread the
+ // call is issued on. Attention! Since audio system thread may outlive all the
+ // others, callbacks must always be bound to weak pointers!
using OnAudioParamsCallback = base::Callback<void(const AudioParameters&)>;
using OnBoolCallback = base::Callback<void(bool)>;
@@ -47,6 +53,8 @@ class MEDIA_EXPORT AudioSystem {
virtual void HasInputDevices(OnBoolCallback on_has_devices_cb) const = 0;
+ virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0;
+
// Must not be used for anything but stream creation.
virtual AudioManager* GetAudioManager() const = 0;
« no previous file with comments | « content/browser/renderer_host/media/video_capture_unittest.cc ('k') | media/audio/audio_system_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698