OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "chromecast/browser/media/cast_mojo_media_application.h" | 5 #include "chromecast/browser/media/cast_mojo_media_application.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "chromecast/browser/media/cast_mojo_media_client.h" | 9 #include "chromecast/browser/media/cast_mojo_media_client.h" |
10 #include "media/base/media_log.h" | 10 #include "media/base/media_log.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 | 13 |
14 namespace { | 14 namespace { |
15 void CreateServiceFactory( | 15 void CreateServiceFactory( |
16 mojo::InterfaceRequest<media::interfaces::ServiceFactory> request, | 16 mojo::InterfaceRequest<media::interfaces::ServiceFactory> request, |
17 mojo::shell::mojom::InterfaceProvider* interfaces, | 17 mojo::shell::mojom::InterfaceProvider* interfaces, |
18 scoped_refptr<media::MediaLog> media_log, | 18 scoped_refptr<media::MediaLog> media_log, |
19 std::unique_ptr<mojo::MessageLoopRef> app_refcount, | 19 std::unique_ptr<mojo::MessageLoopRef> app_refcount, |
20 media::MojoMediaClient* mojo_media_client) { | 20 media::MojoMediaClient* mojo_media_client) { |
21 new ::media::ServiceFactoryImpl(std::move(request), interfaces, | 21 new ::media::ServiceFactoryImpl(std::move(request), interfaces, |
22 std::move(media_log), std::move(app_refcount), | 22 std::move(media_log), std::move(app_refcount), |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 std::unique_ptr<mojo::MessageLoopRef> app_refcount = ref_factory_.CreateRef(); | 59 std::unique_ptr<mojo::MessageLoopRef> app_refcount = ref_factory_.CreateRef(); |
60 media_task_runner_->PostTask( | 60 media_task_runner_->PostTask( |
61 FROM_HERE, | 61 FROM_HERE, |
62 base::Bind(&CreateServiceFactory, base::Passed(&request), | 62 base::Bind(&CreateServiceFactory, base::Passed(&request), |
63 connection->GetRemoteInterfaces(), media_log_, | 63 connection->GetRemoteInterfaces(), media_log_, |
64 base::Passed(&app_refcount), mojo_media_client_.get())); | 64 base::Passed(&app_refcount), mojo_media_client_.get())); |
65 } | 65 } |
66 | 66 |
67 } // namespace media | 67 } // namespace media |
68 } // namespace chromecast | 68 } // namespace chromecast |
OLD | NEW |