OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ | 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ |
6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ | 6 #define MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "media/mojo/interfaces/service_factory.mojom.h" | 10 #include "media/mojo/interfaces/service_factory.mojom.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 : public mojo::ShellClient, | 22 : public mojo::ShellClient, |
23 public mojo::InterfaceFactory<interfaces::ServiceFactory> { | 23 public mojo::InterfaceFactory<interfaces::ServiceFactory> { |
24 public: | 24 public: |
25 explicit MojoMediaApplication(scoped_ptr<MojoMediaClient> mojo_media_client); | 25 explicit MojoMediaApplication(scoped_ptr<MojoMediaClient> mojo_media_client); |
26 ~MojoMediaApplication() final; | 26 ~MojoMediaApplication() final; |
27 | 27 |
28 private: | 28 private: |
29 // mojo::ShellClient implementation. | 29 // mojo::ShellClient implementation. |
30 void Initialize(mojo::Connector* connector, | 30 void Initialize(mojo::Connector* connector, |
31 const std::string& url, | 31 const std::string& url, |
32 uint32_t id, | 32 const std::string& user_id, |
33 uint32_t user_id) final; | 33 uint32_t id) final; |
34 bool AcceptConnection(mojo::Connection* connection) final; | 34 bool AcceptConnection(mojo::Connection* connection) final; |
35 | 35 |
36 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation. | 36 // mojo::InterfaceFactory<interfaces::ServiceFactory> implementation. |
37 void Create(mojo::Connection* connection, | 37 void Create(mojo::Connection* connection, |
38 mojo::InterfaceRequest<interfaces::ServiceFactory> request) final; | 38 mojo::InterfaceRequest<interfaces::ServiceFactory> request) final; |
39 | 39 |
40 // Note: Since each instance runs on a different thread, do not share a common | 40 // Note: Since each instance runs on a different thread, do not share a common |
41 // MojoMediaClient with other instances to avoid threading issues. Hence using | 41 // MojoMediaClient with other instances to avoid threading issues. Hence using |
42 // a scoped_ptr here. | 42 // a scoped_ptr here. |
43 scoped_ptr<MojoMediaClient> mojo_media_client_; | 43 scoped_ptr<MojoMediaClient> mojo_media_client_; |
44 | 44 |
45 mojo::Connector* connector_; | 45 mojo::Connector* connector_; |
46 scoped_refptr<MediaLog> media_log_; | 46 scoped_refptr<MediaLog> media_log_; |
47 mojo::MessageLoopRefFactory ref_factory_; | 47 mojo::MessageLoopRefFactory ref_factory_; |
48 }; | 48 }; |
49 | 49 |
50 } // namespace media | 50 } // namespace media |
51 | 51 |
52 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ | 52 #endif // MEDIA_MOJO_SERVICES_MOJO_MEDIA_APPLICATION_H_ |
OLD | NEW |