Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_ | |
| 6 #define CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_ | |
| 7 | |
| 8 #include "media/mojo/interfaces/service_factory.mojom.h" | |
| 9 #include "mojo/shell/public/cpp/interface_factory.h" | |
| 10 #include "mojo/shell/public/cpp/message_loop_ref.h" | |
| 11 #include "mojo/shell/public/cpp/shell_client.h" | |
| 12 | |
| 13 namespace media { | |
| 14 class MediaLog; | |
| 15 } // namespace media | |
| 16 | |
| 17 namespace chromecast { | |
| 18 namespace media { | |
| 19 | |
| 20 class CastMojoMediaClient; | |
| 21 | |
| 22 class CastMojoMediaApplication | |
| 23 : public mojo::ShellClient, | |
| 24 public mojo::InterfaceFactory<::media::interfaces::ServiceFactory> { | |
| 25 public: | |
| 26 CastMojoMediaApplication( | |
| 27 scoped_ptr<CastMojoMediaClient> mojo_media_client, | |
| 28 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.
| |
| 29 ~CastMojoMediaApplication() final; | |
| 30 | |
| 31 private: | |
| 32 // mojo::ShellClient implementation. | |
| 33 void Initialize(mojo::Connector* connector, | |
| 34 const mojo::Identity& identity, | |
| 35 uint32_t id) final; | |
| 36 bool AcceptConnection(mojo::Connection* connection) final; | |
| 37 | |
| 38 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation. | |
| 39 void Create(mojo::Connection* connection, | |
| 40 mojo::InterfaceRequest<::media::interfaces::ServiceFactory> | |
| 41 request) final; | |
| 42 | |
| 43 scoped_ptr<CastMojoMediaClient> mojo_media_client_; | |
| 44 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | |
| 45 scoped_refptr<::media::MediaLog> media_log_; | |
| 46 mojo::MessageLoopRefFactory ref_factory_; | |
| 47 }; | |
| 48 | |
| 49 } // namespace media | |
| 50 } // namespace chromecast | |
| 51 | |
| 52 #endif // CHROMECAST_BROWSER_MEDIA_CAST_MOJO_MEDIA_APPLICATION_H_ | |
| OLD | NEW |