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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 OnDestroyingVideoSurface); | 283 OnDestroyingVideoSurface); |
284 #endif | 284 #endif |
285 IPC_MESSAGE_UNHANDLED(handled = false) | 285 IPC_MESSAGE_UNHANDLED(handled = false) |
286 IPC_END_MESSAGE_MAP() | 286 IPC_END_MESSAGE_MAP() |
287 if (handled) | 287 if (handled) |
288 return true; | 288 return true; |
289 | 289 |
290 return false; | 290 return false; |
291 } | 291 } |
292 | 292 |
293 bool GpuChildThread::AcceptConnection(shell::Connection* connection) { | 293 bool GpuChildThread::OnConnect(shell::Connection* connection) { |
294 // Use of base::Unretained(this) is safe here because |service_registry()| | 294 // Use of base::Unretained(this) is safe here because |service_registry()| |
295 // will be destroyed before GpuChildThread is destructed. | 295 // will be destroyed before GpuChildThread is destructed. |
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 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 | 585 |
586 void GpuChildThread::BindProcessControlRequest( | 586 void GpuChildThread::BindProcessControlRequest( |
587 mojo::InterfaceRequest<mojom::ProcessControl> request) { | 587 mojo::InterfaceRequest<mojom::ProcessControl> request) { |
588 DVLOG(1) << "GPU: Binding ProcessControl request"; | 588 DVLOG(1) << "GPU: Binding ProcessControl request"; |
589 DCHECK(process_control_); | 589 DCHECK(process_control_); |
590 process_control_bindings_.AddBinding(process_control_.get(), | 590 process_control_bindings_.AddBinding(process_control_.get(), |
591 std::move(request)); | 591 std::move(request)); |
592 } | 592 } |
593 | 593 |
594 } // namespace content | 594 } // namespace content |
OLD | NEW |