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

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: cleaned up deps 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
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..e28a0014816c54b97d581d117e643c110e887726
--- /dev/null
+++ b/chromecast/browser/media/cast_mojo_media_application.h
@@ -0,0 +1,52 @@
+// 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 "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 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);
halliwell 2016/04/05 00:01:56 nit, #includes for scoped_ptr, scoped_refptr, Sing
alokp 2016/04/05 05:27:16 Done.
+ ~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_

Powered by Google App Engine
This is Rietveld 408576698