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

Unified Diff: chromecast/browser/media/cast_mojo_media_application.h

Issue 1854893002: [chromecast] Bind and run mojo media services on cma thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments 2 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
« no previous file with comments | « chromecast/browser/media/BUILD.gn ('k') | chromecast/browser/media/cast_mojo_media_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/media/cast_mojo_media_application.h
diff --git a/chromecast/browser/media/cast_mojo_media_application.h b/chromecast/browser/media/cast_mojo_media_application.h
new file mode 100644
index 0000000000000000000000000000000000000000..a3bc9937216a176764ecdb0b8b15650962699aaa
--- /dev/null
+++ b/chromecast/browser/media/cast_mojo_media_application.h
@@ -0,0 +1,58 @@
+// Copyright 2016 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 CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_
+#define CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_
+
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "media/mojo/interfaces/service_factory.mojom.h"
+#include "mojo/shell/public/cpp/interface_factory.h"
+#include "mojo/shell/public/cpp/message_loop_ref.h"
+#include "mojo/shell/public/cpp/shell_client.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
+namespace media {
+class MediaLog;
+} // namespace media
+
+namespace chromecast {
+namespace media {
+
+class CastMojoMediaClient;
+
+class CastMojoMediaApplication
+ : public mojo::ShellClient,
+ public mojo::InterfaceFactory<::media::interfaces::ServiceFactory> {
+ public:
+ CastMojoMediaApplication(
+ scoped_ptr<CastMojoMediaClient> mojo_media_client,
+ scoped_refptr<base::SingleThreadTaskRunner> media_task_runner);
+ ~CastMojoMediaApplication() final;
+
+ private:
+ // mojo::ShellClient implementation.
+ void Initialize(mojo::Connector* connector,
+ const mojo::Identity& identity,
+ uint32_t id) final;
+ bool AcceptConnection(mojo::Connection* connection) final;
+
+ // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation.
+ void Create(mojo::Connection* connection,
+ mojo::InterfaceRequest<::media::interfaces::ServiceFactory>
+ request) final;
+
+ scoped_ptr<CastMojoMediaClient> mojo_media_client_;
+ scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_;
+ scoped_refptr<::media::MediaLog> media_log_;
+ mojo::MessageLoopRefFactory ref_factory_;
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_
« no previous file with comments | « chromecast/browser/media/BUILD.gn ('k') | chromecast/browser/media/cast_mojo_media_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698