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 | 9 |
9 #include "base/bind.h" | 10 #include "base/bind.h" |
10 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
11 #include "base/threading/worker_pool.h" | 12 #include "base/threading/worker_pool.h" |
12 #include "build/build_config.h" | 13 #include "build/build_config.h" |
13 #include "content/child/child_process.h" | 14 #include "content/child/child_process.h" |
14 #include "content/child/thread_safe_sender.h" | 15 #include "content/child/thread_safe_sender.h" |
15 #include "content/common/gpu/gpu_memory_buffer_factory.h" | 16 #include "content/common/gpu/gpu_memory_buffer_factory.h" |
16 #include "content/common/gpu/gpu_messages.h" | 17 #include "content/common/gpu/gpu_messages.h" |
17 #include "content/gpu/gpu_process_control_impl.h" | 18 #include "content/gpu/gpu_process_control_impl.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 void GpuChildThread::OnGpuSwitched() { | 388 void GpuChildThread::OnGpuSwitched() { |
388 DVLOG(1) << "GPU: GPU has switched"; | 389 DVLOG(1) << "GPU: GPU has switched"; |
389 // Notify observers in the GPU process. | 390 // Notify observers in the GPU process. |
390 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); | 391 ui::GpuSwitchingManager::GetInstance()->NotifyGpuSwitched(); |
391 } | 392 } |
392 | 393 |
393 void GpuChildThread::BindProcessControlRequest( | 394 void GpuChildThread::BindProcessControlRequest( |
394 mojo::InterfaceRequest<ProcessControl> request) { | 395 mojo::InterfaceRequest<ProcessControl> request) { |
395 DVLOG(1) << "GPU: Binding ProcessControl request"; | 396 DVLOG(1) << "GPU: Binding ProcessControl request"; |
396 DCHECK(process_control_); | 397 DCHECK(process_control_); |
397 process_control_bindings_.AddBinding(process_control_.get(), request.Pass()); | 398 process_control_bindings_.AddBinding(process_control_.get(), |
| 399 std::move(request)); |
398 } | 400 } |
399 | 401 |
400 } // namespace content | 402 } // namespace content |
OLD | NEW |