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

Side by Side Diff: content/browser/media/audio_output_stream_impl.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: unique_ptr for Binding Created 4 years, 6 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 unified diff | Download patch
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
5 #ifndef CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_STREAM_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_STREAM_IMPL_H_
7
8 #include "base/callback.h"
9 #include "content/browser/media/audio_output_impl.h"
10 #include "content/browser/renderer_host/media/audio_renderer_host.h"
11 #include "content/common/content_export.h"
12 #include "media/mojo/interfaces/audio_output.mojom.h"
13 #include "mojo/public/cpp/bindings/interface_request.h"
14 #include "mojo/public/cpp/bindings/strong_binding.h"
15
16 namespace content {
17
18 // This class implements AudioOutputStream Mojo interface. It will be used
19 // by the AudioOutputClient to perform operations on audio output streams.
20 // AudioOutputClient will perform operations remotely on the
21 // AudioOutputStreamPtr and Mojo will transfer them to AudioOutputStreamImpl.
22 // Owned by AudioOutputImpl.
23 class CONTENT_EXPORT AudioOutputStreamImpl
24 : public NON_EXPORTED_BASE(media::mojom::AudioOutputStream) {
25 public:
26 AudioOutputStreamImpl(int stream_id,
27 AudioOutputImpl* audio_output_impl,
28 media::mojom::AudioOutputStreamRequest request);
29
30 ~AudioOutputStreamImpl() override;
31
32 int stream_id() const { return stream_id_; }
33
34 private:
35 FRIEND_TEST_ALL_PREFIXES(AudioOutputStreamImplTest, Close);
36
37 // AudioOutputStream interface implementation.
38 void Close() override;
39
40 const int stream_id_;
41
42 AudioOutputImpl* audio_output_impl_;
43 // Callback for media::mojom::AudioOutput::CreateStream.
44 media::mojom::AudioOutput::CreateStreamCallback create_stream_callback_;
45 std::unique_ptr<mojo::Binding<AudioOutputStream>> binding_;
46 media::mojom::AudioOutputStreamPtr stream_ptr_;
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_STREAM_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/media/audio_output_impl_unittest.cc ('k') | content/browser/media/audio_output_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698