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 #include "media/mojo/services/mojo_media_application.h" | 5 #include "media/mojo/services/mojo_media_application.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "media/base/media_log.h" | 9 #include "media/base/media_log.h" |
10 #include "media/mojo/services/mojo_media_client.h" | 10 #include "media/mojo/services/mojo_media_client.h" |
11 #include "media/mojo/services/service_factory_impl.h" | 11 #include "media/mojo/services/service_factory_impl.h" |
12 #include "mojo/shell/public/cpp/connection.h" | 12 #include "services/shell/public/cpp/connection.h" |
13 #include "mojo/shell/public/cpp/connector.h" | 13 #include "services/shell/public/cpp/connector.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 | 16 |
17 // TODO(xhwang): Hook up MediaLog when possible. | 17 // TODO(xhwang): Hook up MediaLog when possible. |
18 MojoMediaApplication::MojoMediaApplication( | 18 MojoMediaApplication::MojoMediaApplication( |
19 std::unique_ptr<MojoMediaClient> mojo_media_client) | 19 std::unique_ptr<MojoMediaClient> mojo_media_client) |
20 : mojo_media_client_(std::move(mojo_media_client)), | 20 : mojo_media_client_(std::move(mojo_media_client)), |
21 connector_(nullptr), | 21 connector_(nullptr), |
22 media_log_(new MediaLog()) { | 22 media_log_(new MediaLog()) { |
23 DCHECK(mojo_media_client_); | 23 DCHECK(mojo_media_client_); |
(...skipping 16 matching lines...) Expand all Loading... |
40 void MojoMediaApplication::Create( | 40 void MojoMediaApplication::Create( |
41 mojo::Connection* connection, | 41 mojo::Connection* connection, |
42 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { | 42 mojo::InterfaceRequest<interfaces::ServiceFactory> request) { |
43 // The created object is owned by the pipe. | 43 // The created object is owned by the pipe. |
44 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(), | 44 new ServiceFactoryImpl(std::move(request), connection->GetRemoteInterfaces(), |
45 media_log_, ref_factory_.CreateRef(), | 45 media_log_, ref_factory_.CreateRef(), |
46 mojo_media_client_.get()); | 46 mojo_media_client_.get()); |
47 } | 47 } |
48 | 48 |
49 } // namespace media | 49 } // namespace media |
OLD | NEW |