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 "chrome/browser/chromeos/arc/gpu_arc_video_service_host.h" | 5 #include "chrome/browser/chromeos/arc/gpu_arc_video_service_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "components/arc/arc_bridge_service.h" | 14 #include "components/arc/arc_bridge_service.h" |
15 #include "components/arc/common/video_accelerator.mojom.h" | 15 #include "components/arc/common/video_accelerator.mojom.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/gpu_service_registry.h" | 17 #include "content/public/browser/gpu_service_registry.h" |
18 #include "mojo/edk/embedder/embedder.h" | 18 #include "mojo/edk/embedder/embedder.h" |
19 #include "mojo/edk/embedder/platform_channel_pair.h" | 19 #include "mojo/edk/embedder/platform_channel_pair.h" |
20 #include "mojo/public/cpp/bindings/strong_binding.h" | 20 #include "mojo/public/cpp/bindings/strong_binding.h" |
21 #include "services/shell/public/cpp/interface_provider.h" | 21 #include "services/service_manager/public/cpp/interface_provider.h" |
22 | 22 |
23 namespace arc { | 23 namespace arc { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 void DeprecatedConnectToVideoAcceleratorServiceOnIOThread( | 27 void DeprecatedConnectToVideoAcceleratorServiceOnIOThread( |
28 mojom::VideoAcceleratorServiceClientRequest request) { | 28 mojom::VideoAcceleratorServiceClientRequest request) { |
29 // Note |request| is not a ServiceRequest. It is a ClientRequest but doesn't | 29 // Note |request| is not a ServiceRequest. It is a ClientRequest but doesn't |
30 // request for a Client. Instead, it requests for a Service while specified | 30 // request for a Client. Instead, it requests for a Service while specified |
31 // the client. It works this odd way because the interfaces were modeled as | 31 // the client. It works this odd way because the interfaces were modeled as |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 return; | 147 return; |
148 } | 148 } |
149 callback.Run(std::move(child_handle), token); | 149 callback.Run(std::move(child_handle), token); |
150 | 150 |
151 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(), | 151 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(), |
152 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( | 152 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( |
153 std::move(server_pipe))); | 153 std::move(server_pipe))); |
154 } | 154 } |
155 | 155 |
156 } // namespace arc | 156 } // namespace arc |
OLD | NEW |