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

Unified 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, 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 | « no previous file | content/browser/media/audio_output_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/audio_output_impl.h
diff --git a/content/browser/media/audio_output_impl.h b/content/browser/media/audio_output_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e462ddaf3c0e9060cdd1611a218bdcf1b517bc4
--- /dev/null
+++ b/content/browser/media/audio_output_impl.h
@@ -0,0 +1,68 @@
+// Copyright 2015 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_MEDIA_AUDIO_OUTPUT_IMPL_H_
+#define CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_RECORDING_IMPL_H_
+
+#include <map>
+
+#include "base/callback.h"
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/threading/thread_checker.h"
+#include "content/browser/renderer_host/media/audio_renderer_host.h"
+#include "content/common/content_export.h"
+#include "content/common/media/audio_output.mojom.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+
+namespace base {
+class FilePath;
+}
+
+namespace content {
+
+// This class must always be accessed from the creation thread.
+class CONTENT_EXPORT AudioOutputImpl : NON_EXPORTED_BASE(public AudioOutput) {
+ public:
+ AudioOutputImpl(scoped_refptr<AudioRendererHost> audio_renderer_host,
+ AudioOutputRequest request);
+
+ ~AudioOutputImpl() override;
+
+ static void Create(scoped_refptr<AudioRendererHost> audio_renderer_host,
+ AudioOutputRequest request) {
+ new AudioOutputImpl(audio_renderer_host, std::move(request));
+ }
+
+ int render_host_id() const { return render_host_id_; }
+ void InitMojo(mojo::InterfaceRequest<AudioOutput> request);
+
+ private:
+ void CloseStream(int32_t id) override;
+ void CreateStream(int stream_id_,
+ int render_frame_id_,
+ AudioOutputStreamParametersPtr params,
+ const CreateStreamCallback& callback) override;
+ void DoCloseStream(int32_t id);
+
+ // Mojo connection error callback.
+ void OnDisconnect(AudioOutputImpl* impl);
+
+ // Render process host ID.
+ int render_host_id_;
+
+ scoped_refptr<AudioRendererHost> audio_renderer_host_;
+
+ base::ThreadChecker thread_checker_;
+ mojo::Binding<AudioOutput> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(AudioOutputImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_MEDIA_AUDIO_OUTPUT_IMPL_H_
« 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