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

Unified Diff: media/mojo/services/default_mojo_media_client.h

Issue 1697233002: Reland of land "media: Refactor MojoMediaClient" with fix. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « media/mojo/services/android_mojo_media_client.cc ('k') | media/mojo/services/default_mojo_media_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/default_mojo_media_client.h
diff --git a/media/mojo/services/default_mojo_media_client.h b/media/mojo/services/default_mojo_media_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..7498e2577ba678166d945dd41cb4d9d542c0c3e7
--- /dev/null
+++ b/media/mojo/services/default_mojo_media_client.h
@@ -0,0 +1,47 @@
+// Copyright 2014 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 MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_
+#define MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "media/audio/fake_audio_log_factory.h"
+#include "media/mojo/services/mojo_media_client.h"
+
+namespace media {
+
+class AudioHardwareConfig;
+class AudioRendererSink;
+class VideoRendererSink;
+
+// Default MojoMediaClient for MojoMediaApplication.
+class DefaultMojoMediaClient : public MojoMediaClient {
+ public:
+ DefaultMojoMediaClient();
+ ~DefaultMojoMediaClient() final;
+
+ // MojoMediaClient implementation.
+ void Initialize() final;
+ scoped_ptr<RendererFactory> CreateRendererFactory(
+ const scoped_refptr<MediaLog>& media_log) final;
+ AudioRendererSink* CreateAudioRendererSink() final;
+ VideoRendererSink* CreateVideoRendererSink(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) final;
+ scoped_ptr<CdmFactory> CreateCdmFactory(
+ mojo::shell::mojom::InterfaceProvider* /* service_provider */) final;
+
+ private:
+ FakeAudioLogFactory fake_audio_log_factory_;
+ scoped_ptr<AudioHardwareConfig> audio_hardware_config_;
+ scoped_refptr<AudioRendererSink> audio_renderer_sink_;
+ scoped_ptr<VideoRendererSink> video_renderer_sink_;
+
+ DISALLOW_COPY_AND_ASSIGN(DefaultMojoMediaClient);
+};
+
+} // namespace media
+
+#endif // MEDIA_MOJO_SERVICES_DEFAULT_MOJO_MEDIA_CLIENT_H_
« no previous file with comments | « media/mojo/services/android_mojo_media_client.cc ('k') | media/mojo/services/default_mojo_media_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698