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 "base/location.h" | 7 #include "base/location.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/gpu_service_registry.h" | 12 #include "content/public/browser/gpu_service_registry.h" |
13 #include "content/public/common/service_registry.h" | 13 #include "content/public/common/service_registry.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 mojo::InterfacePtrInfo<arc::mojom::VideoHost> GetServiceOnIOThread() { | 17 mojo::InterfacePtrInfo<arc::mojom::VideoHost> GetServiceOnIOThread() { |
18 arc::mojom::VideoHostPtr host_ptr; | 18 arc::mojom::VideoHostPtr host_ptr; |
19 content::ServiceRegistry* registry = content::GetGpuServiceRegistry(); | 19 content::ServiceRegistry* registry = content::GetGpuServiceRegistry(); |
20 registry->ConnectToRemoteService(mojo::GetProxy(&host_ptr)); | 20 registry->ConnectToRemoteService(mojo::GetProxy(&host_ptr)); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 void GpuArcVideoServiceHost::BindServiceAndCreateChannel( | 63 void GpuArcVideoServiceHost::BindServiceAndCreateChannel( |
64 const OnRequestArcVideoAcceleratorChannelCallback& callback, | 64 const OnRequestArcVideoAcceleratorChannelCallback& callback, |
65 mojo::InterfacePtrInfo<arc::mojom::VideoHost> ptr_info) { | 65 mojo::InterfacePtrInfo<arc::mojom::VideoHost> ptr_info) { |
66 DCHECK(thread_checker_.CalledOnValidThread()); | 66 DCHECK(thread_checker_.CalledOnValidThread()); |
67 | 67 |
68 service_ptr_.Bind(std::move(ptr_info)); | 68 service_ptr_.Bind(std::move(ptr_info)); |
69 service_ptr_->OnRequestArcVideoAcceleratorChannel(callback); | 69 service_ptr_->OnRequestArcVideoAcceleratorChannel(callback); |
70 } | 70 } |
71 | 71 |
72 } // namespace arc | 72 } // namespace arc |
OLD | NEW |