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

Side by Side Diff: content/browser/media/audio_output_impl.h

Issue 1856673002: Mojofication of the Chrome Audio Rendering Prototype 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/media/audio_output_impl.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 2015 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_IMPL_H_
6 #define CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_RECORDING_IMPL_H_
7
8 #include <map>
9
10 #include "base/callback.h"
11 #include "base/compiler_specific.h"
12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/threading/thread_checker.h"
16 #include "content/browser/renderer_host/media/audio_renderer_host.h"
17 #include "content/common/content_export.h"
18 #include "content/common/media/audio_output.mojom.h"
19 #include "mojo/public/cpp/bindings/binding.h"
20 #include "mojo/public/cpp/bindings/interface_request.h"
21
22 namespace base {
23 class FilePath;
24 }
25
26 namespace content {
27
28 // This class must always be accessed from the creation thread.
29 class CONTENT_EXPORT AudioOutputImpl : NON_EXPORTED_BASE(public AudioOutput) {
30 public:
31 AudioOutputImpl(scoped_refptr<AudioRendererHost> audio_renderer_host,
32 AudioOutputRequest request);
33
34 ~AudioOutputImpl() override;
35
36 static void Create(scoped_refptr<AudioRendererHost> audio_renderer_host,
37 AudioOutputRequest request) {
38 new AudioOutputImpl(audio_renderer_host, std::move(request));
39 }
40
41 int render_host_id() const { return render_host_id_; }
42 void InitMojo(mojo::InterfaceRequest<AudioOutput> request);
43
44 private:
45 void CloseStream(int32_t id) override;
46 void CreateStream(int stream_id_,
47 int render_frame_id_,
48 AudioOutputStreamParametersPtr params,
49 const CreateStreamCallback& callback) override;
50 void DoCloseStream(int32_t id);
51
52 // Mojo connection error callback.
53 void OnDisconnect(AudioOutputImpl* impl);
54
55 // Render process host ID.
56 int render_host_id_;
57
58 scoped_refptr<AudioRendererHost> audio_renderer_host_;
59
60 base::ThreadChecker thread_checker_;
61 mojo::Binding<AudioOutput> binding_;
62
63 DISALLOW_COPY_AND_ASSIGN(AudioOutputImpl);
64 };
65
66 } // namespace content
67
68 #endif // CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/audio_output_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698