| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/gpu/gpu_child_thread.h" | 5 #include "content/gpu/gpu_child_thread.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 IPC_END_MESSAGE_MAP() | 278 IPC_END_MESSAGE_MAP() |
| 279 if (handled) | 279 if (handled) |
| 280 return true; | 280 return true; |
| 281 | 281 |
| 282 return false; | 282 return false; |
| 283 } | 283 } |
| 284 | 284 |
| 285 void GpuChildThread::OnAssociatedInterfaceRequest( | 285 void GpuChildThread::OnAssociatedInterfaceRequest( |
| 286 const std::string& name, | 286 const std::string& name, |
| 287 mojo::ScopedInterfaceEndpointHandle handle) { | 287 mojo::ScopedInterfaceEndpointHandle handle) { |
| 288 associated_interfaces_.BindRequest(name, std::move(handle)); | 288 if (associated_interfaces_.CanBindRequest(name)) |
| 289 associated_interfaces_.BindRequest(name, std::move(handle)); |
| 290 else |
| 291 ChildThreadImpl::OnAssociatedInterfaceRequest(name, std::move(handle)); |
| 289 } | 292 } |
| 290 | 293 |
| 291 void GpuChildThread::CreateGpuService( | 294 void GpuChildThread::CreateGpuService( |
| 292 ui::mojom::GpuServiceRequest request, | 295 ui::mojom::GpuServiceRequest request, |
| 293 ui::mojom::GpuHostPtr gpu_host, | 296 ui::mojom::GpuHostPtr gpu_host, |
| 294 const gpu::GpuPreferences& gpu_preferences) { | 297 const gpu::GpuPreferences& gpu_preferences) { |
| 295 gpu_service_->Bind(std::move(request)); | 298 gpu_service_->Bind(std::move(request)); |
| 296 | 299 |
| 297 gpu_info_.video_decode_accelerator_capabilities = | 300 gpu_info_.video_decode_accelerator_capabilities = |
| 298 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences); | 301 media::GpuVideoDecodeAccelerator::GetCapabilities(gpu_preferences); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 | 496 |
| 494 void GpuChildThread::BindServiceFactoryRequest( | 497 void GpuChildThread::BindServiceFactoryRequest( |
| 495 service_manager::mojom::ServiceFactoryRequest request) { | 498 service_manager::mojom::ServiceFactoryRequest request) { |
| 496 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; | 499 DVLOG(1) << "GPU: Binding service_manager::mojom::ServiceFactoryRequest"; |
| 497 DCHECK(service_factory_); | 500 DCHECK(service_factory_); |
| 498 service_factory_bindings_.AddBinding(service_factory_.get(), | 501 service_factory_bindings_.AddBinding(service_factory_.get(), |
| 499 std::move(request)); | 502 std::move(request)); |
| 500 } | 503 } |
| 501 | 504 |
| 502 } // namespace content | 505 } // namespace content |
| OLD | NEW |