| 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 | 8 |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 arc_bridge_service()->video()->AddObserver(this); | 66 arc_bridge_service()->video()->AddObserver(this); |
| 67 } | 67 } |
| 68 | 68 |
| 69 GpuArcVideoServiceHost::~GpuArcVideoServiceHost() { | 69 GpuArcVideoServiceHost::~GpuArcVideoServiceHost() { |
| 70 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 70 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 71 arc_bridge_service()->video()->RemoveObserver(this); | 71 arc_bridge_service()->video()->RemoveObserver(this); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void GpuArcVideoServiceHost::OnInstanceReady() { | 74 void GpuArcVideoServiceHost::OnInstanceReady() { |
| 75 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 75 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 76 auto video_instance = arc_bridge_service()->video()->instance(); | 76 auto* video_instance = arc_bridge_service()->video()->instance(); |
| 77 DCHECK(video_instance); | 77 DCHECK(video_instance); |
| 78 video_instance->Init(binding_.CreateInterfacePtrAndBind()); | 78 video_instance->Init(binding_.CreateInterfacePtrAndBind()); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void GpuArcVideoServiceHost::DeprecatedOnRequestArcVideoAcceleratorChannel( | 81 void GpuArcVideoServiceHost::DeprecatedOnRequestArcVideoAcceleratorChannel( |
| 82 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) { | 82 const DeprecatedOnRequestArcVideoAcceleratorChannelCallback& callback) { |
| 83 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 83 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 84 | 84 |
| 85 // Hardcode pid 0 since it is unused in mojo. | 85 // Hardcode pid 0 since it is unused in mojo. |
| 86 const base::ProcessHandle kUnusedChildProcessHandle = | 86 const base::ProcessHandle kUnusedChildProcessHandle = |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 callback.Run(std::move(child_handle), token); | 151 callback.Run(std::move(child_handle), token); |
| 152 | 152 |
| 153 // The lifetime is managed by the StrongBinding insides the | 153 // The lifetime is managed by the StrongBinding insides the |
| 154 // VideoAcceleratorFactoryService. | 154 // VideoAcceleratorFactoryService. |
| 155 new VideoAcceleratorFactoryService( | 155 new VideoAcceleratorFactoryService( |
| 156 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( | 156 mojo::MakeRequest<mojom::VideoAcceleratorFactory>( |
| 157 std::move(server_pipe))); | 157 std::move(server_pipe))); |
| 158 } | 158 } |
| 159 | 159 |
| 160 } // namespace arc | 160 } // namespace arc |
| OLD | NEW |