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/video/gpu_arc_video_service_host.h" | 5 #include "chrome/browser/chromeos/arc/video/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" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 GpuArcVideoServiceHost::~GpuArcVideoServiceHost() { | 67 GpuArcVideoServiceHost::~GpuArcVideoServiceHost() { |
68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 68 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
69 arc_bridge_service()->video()->RemoveObserver(this); | 69 arc_bridge_service()->video()->RemoveObserver(this); |
70 } | 70 } |
71 | 71 |
72 void GpuArcVideoServiceHost::OnInstanceReady() { | 72 void GpuArcVideoServiceHost::OnInstanceReady() { |
73 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 73 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
74 auto* video_instance = | 74 auto* video_instance = |
75 arc_bridge_service()->video()->GetInstanceForMethod("Init"); | 75 ARC_GET_INSTANCE_FOR_METHOD(arc_bridge_service()->video(), Init); |
76 DCHECK(video_instance); | 76 DCHECK(video_instance); |
77 video_instance->Init(binding_.CreateInterfacePtrAndBind()); | 77 video_instance->Init(binding_.CreateInterfacePtrAndBind()); |
78 } | 78 } |
79 | 79 |
80 void GpuArcVideoServiceHost::DeprecatedOnRequestArcVideoAcceleratorChannel( | 80 void GpuArcVideoServiceHost::DeprecatedOnRequestArcVideoAcceleratorChannel( |
81 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) { | 81 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) { |
82 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 82 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
83 | 83 |
84 // Hardcode pid 0 since it is unused in mojo. | 84 // Hardcode pid 0 since it is unused in mojo. |
85 const base::ProcessHandle kUnusedChildProcessHandle = | 85 const base::ProcessHandle kUnusedChildProcessHandle = |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 return; | 148 return; |
149 } | 149 } |
150 callback.Run(std::move(child_handle), token); | 150 callback.Run(std::move(child_handle), token); |
151 | 151 |
152 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(), | 152 mojo::MakeStrongBinding(base::MakeUnique<VideoAcceleratorFactoryService>(), |
153 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( | 153 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( |
154 std::move(server_pipe))); | 154 std::move(server_pipe))); |
155 } | 155 } |
156 | 156 |
157 } // namespace arc | 157 } // namespace arc |
OLD | NEW |