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/browser/gpu/browser_gpu_channel_host_factory.h" | 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
13 #include "base/threading/thread_restrictions.h" | 13 #include "base/threading/thread_restrictions.h" |
14 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
15 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 15 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
16 #include "content/browser/gpu/gpu_data_manager_impl.h" | 16 #include "content/browser/gpu/gpu_data_manager_impl.h" |
17 #include "content/browser/gpu/gpu_process_host.h" | 17 #include "content/browser/gpu/gpu_process_host.h" |
18 #include "content/browser/gpu/gpu_surface_tracker.h" | 18 #include "content/browser/gpu/gpu_surface_tracker.h" |
19 #include "content/common/child_process_host_impl.h" | 19 #include "content/common/child_process_host_impl.h" |
20 #include "content/common/gpu/gpu_messages.h" | 20 #include "content/common/gpu/gpu_messages.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/gpu_data_manager.h" | 22 #include "content/public/browser/gpu_data_manager.h" |
23 #include "content/public/common/content_client.h" | 23 #include "content/public/common/content_client.h" |
24 #include "ipc/ipc_channel_handle.h" | 24 #include "ipc/ipc_channel_handle.h" |
25 #include "ipc/ipc_forwarding_message_filter.h" | |
26 #include "ipc/message_filter.h" | 25 #include "ipc/message_filter.h" |
27 | 26 |
28 namespace content { | 27 namespace content { |
29 | 28 |
30 BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL; | 29 BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL; |
31 | 30 |
32 struct BrowserGpuChannelHostFactory::CreateRequest { | 31 struct BrowserGpuChannelHostFactory::CreateRequest { |
33 CreateRequest(int32 route_id) | 32 CreateRequest(int32 route_id) |
34 : event(true, false), | 33 : event(true, false), |
35 gpu_host_id(0), | 34 gpu_host_id(0), |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 int host_id, | 401 int host_id, |
403 scoped_refptr<IPC::MessageFilter> filter) { | 402 scoped_refptr<IPC::MessageFilter> filter) { |
404 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 403 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
405 | 404 |
406 GpuProcessHost* host = GpuProcessHost::FromID(host_id); | 405 GpuProcessHost* host = GpuProcessHost::FromID(host_id); |
407 if (host) | 406 if (host) |
408 host->AddFilter(filter.get()); | 407 host->AddFilter(filter.get()); |
409 } | 408 } |
410 | 409 |
411 } // namespace content | 410 } // namespace content |
OLD | NEW |