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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 connection->GetInterfaceRegistry()->AddInterface(base::Bind( | 296 connection->GetInterfaceRegistry()->AddInterface(base::Bind( |
297 &GpuChildThread::BindProcessControlRequest, base::Unretained(this))); | 297 &GpuChildThread::BindProcessControlRequest, base::Unretained(this))); |
298 | 298 |
299 if (GetContentClient()->gpu()) { // NULL in tests. | 299 if (GetContentClient()->gpu()) { // NULL in tests. |
300 GetContentClient()->gpu()->ExposeInterfacesToBrowser( | 300 GetContentClient()->gpu()->ExposeInterfacesToBrowser( |
301 connection->GetInterfaceRegistry()); | 301 connection->GetInterfaceRegistry()); |
302 } | 302 } |
303 | 303 |
304 // We don't want to process any incoming interface requests until | 304 // We don't want to process any incoming interface requests until |
305 // OnInitialize(). | 305 // OnInitialize(). |
306 connection->GetInterfaceRegistry()->PauseBinding(); | 306 if (!gpu_channel_manager_) { |
307 resume_interface_bindings_callback_ = base::Bind( | 307 connection->GetInterfaceRegistry()->PauseBinding(); |
308 &shell::InterfaceRegistry::ResumeBinding, | 308 resume_interface_bindings_callback_ = base::Bind( |
309 connection->GetInterfaceRegistry()->GetWeakPtr()); | 309 &shell::InterfaceRegistry::ResumeBinding, |
| 310 connection->GetInterfaceRegistry()->GetWeakPtr()); |
| 311 } |
310 | 312 |
311 return true; | 313 return true; |
312 } | 314 } |
313 | 315 |
314 shell::InterfaceRegistry* GpuChildThread::GetInterfaceRegistryForConnection() { | 316 shell::InterfaceRegistry* GpuChildThread::GetInterfaceRegistryForConnection() { |
315 return nullptr; | 317 return nullptr; |
316 } | 318 } |
317 | 319 |
318 shell::InterfaceProvider* GpuChildThread::GetInterfaceProviderForConnection() { | 320 shell::InterfaceProvider* GpuChildThread::GetInterfaceProviderForConnection() { |
319 return nullptr; | 321 return nullptr; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 585 |
584 void GpuChildThread::BindProcessControlRequest( | 586 void GpuChildThread::BindProcessControlRequest( |
585 mojo::InterfaceRequest<mojom::ProcessControl> request) { | 587 mojo::InterfaceRequest<mojom::ProcessControl> request) { |
586 DVLOG(1) << "GPU: Binding ProcessControl request"; | 588 DVLOG(1) << "GPU: Binding ProcessControl request"; |
587 DCHECK(process_control_); | 589 DCHECK(process_control_); |
588 process_control_bindings_.AddBinding(process_control_.get(), | 590 process_control_bindings_.AddBinding(process_control_.get(), |
589 std::move(request)); | 591 std::move(request)); |
590 } | 592 } |
591 | 593 |
592 } // namespace content | 594 } // namespace content |
OLD | NEW |