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

Unified Diff: content/renderer/media/audio_message_filter.h

Issue 1930393002: Switch stream creation and closing in Chrome audio rendering from IPC to Mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: content/renderer/media/audio_message_filter.h
diff --git a/content/renderer/media/audio_message_filter.h b/content/renderer/media/audio_message_filter.h
index 47a5ed8c8da4ee75c2cb5133bd387bf078908e6c..309bde6538ea62d35c5f9a272e868e37810a9121 100644
--- a/content/renderer/media/audio_message_filter.h
+++ b/content/renderer/media/audio_message_filter.h
@@ -19,12 +19,14 @@
#include "ipc/message_filter.h"
#include "media/audio/audio_output_ipc.h"
#include "media/base/audio_hardware_config.h"
+#include "media/mojo/interfaces/audio_output.mojom.h"
namespace base {
class SingleThreadTaskRunner;
}
namespace content {
+class AudioOutputClient;
// MessageFilter that handles audio messages and delegates them to audio
// renderers. Created on render thread, AudioMessageFilter is operated on
@@ -51,10 +53,16 @@ class CONTENT_EXPORT AudioMessageFilter : public IPC::MessageFilter {
return io_task_runner_.get();
}
+ // Setter for |audio_output_client_|.
+ void SetAudioOutputClient(content::AudioOutputClient* audio_output_client) {
mcasas 2016/04/29 18:29:00 s/SetAudioOutputClient/set_audio_output_client/ h
rchtara 2016/05/23 16:38:18 Done.
+ audio_output_client_.reset(audio_output_client);
+ }
+
protected:
~AudioMessageFilter() override;
private:
+ friend class AudioOutputClient;
Henrik Grunell 2016/05/02 12:12:23 This should not be needed. Use setter/getter funct
rchtara 2016/05/23 16:38:18 Done.
FRIEND_TEST_ALL_PREFIXES(AudioMessageFilterTest, Basic);
FRIEND_TEST_ALL_PREFIXES(AudioMessageFilterTest, Delegates);
@@ -95,6 +103,7 @@ class CONTENT_EXPORT AudioMessageFilter : public IPC::MessageFilter {
// A map of stream ids to delegates; must only be accessed on
// |io_task_runner_|.
IDMap<media::AudioOutputIPCDelegate> delegates_;
+ scoped_ptr<content::AudioOutputClient> audio_output_client_;
mcasas 2016/04/29 18:29:00 std::unique_ptr.
Henrik Grunell 2016/05/02 12:12:23 When, after follow-up CLs, this class is removed,
rchtara 2016/05/23 16:38:18 It should be owened by the owner of the AudioMessa
rchtara 2016/05/23 16:38:18 Done.
// Task runner on which IPC calls are executed.
const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;

Powered by Google App Engine
This is Rietveld 408576698