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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "base/tracked_objects.h" | 40 #include "base/tracked_objects.h" |
41 #include "cc/base/switches.h" | 41 #include "cc/base/switches.h" |
42 #include "content/browser/appcache/appcache_dispatcher_host.h" | 42 #include "content/browser/appcache/appcache_dispatcher_host.h" |
43 #include "content/browser/appcache/chrome_appcache_service.h" | 43 #include "content/browser/appcache/chrome_appcache_service.h" |
44 #include "content/browser/battery_status/battery_status_message_filter.h" | 44 #include "content/browser/battery_status/battery_status_message_filter.h" |
45 #include "content/browser/browser_child_process_host_impl.h" | 45 #include "content/browser/browser_child_process_host_impl.h" |
46 #include "content/browser/browser_main.h" | 46 #include "content/browser/browser_main.h" |
47 #include "content/browser/browser_main_loop.h" | 47 #include "content/browser/browser_main_loop.h" |
48 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 48 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
49 #include "content/browser/child_process_security_policy_impl.h" | 49 #include "content/browser/child_process_security_policy_impl.h" |
| 50 #include "content/browser/device_sensors/device_light_message_filter.h" |
50 #include "content/browser/device_sensors/device_motion_message_filter.h" | 51 #include "content/browser/device_sensors/device_motion_message_filter.h" |
51 #include "content/browser/device_sensors/device_orientation_message_filter.h" | 52 #include "content/browser/device_sensors/device_orientation_message_filter.h" |
52 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 53 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
53 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 54 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
54 #include "content/browser/download/mhtml_generation_manager.h" | 55 #include "content/browser/download/mhtml_generation_manager.h" |
55 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 56 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
56 #include "content/browser/fileapi/fileapi_message_filter.h" | 57 #include "content/browser/fileapi/fileapi_message_filter.h" |
57 #include "content/browser/frame_host/render_frame_message_filter.h" | 58 #include "content/browser/frame_host/render_frame_message_filter.h" |
58 #include "content/browser/gpu/compositor_util.h" | 59 #include "content/browser/gpu/compositor_util.h" |
59 #include "content/browser/gpu/gpu_data_manager_impl.h" | 60 #include "content/browser/gpu/gpu_data_manager_impl.h" |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 #endif | 881 #endif |
881 | 882 |
882 AddFilter(new TraceMessageFilter()); | 883 AddFilter(new TraceMessageFilter()); |
883 AddFilter(new ResolveProxyMsgHelper( | 884 AddFilter(new ResolveProxyMsgHelper( |
884 browser_context->GetRequestContextForRenderProcess(GetID()))); | 885 browser_context->GetRequestContextForRenderProcess(GetID()))); |
885 AddFilter(new QuotaDispatcherHost( | 886 AddFilter(new QuotaDispatcherHost( |
886 GetID(), | 887 GetID(), |
887 storage_partition_impl_->GetQuotaManager(), | 888 storage_partition_impl_->GetQuotaManager(), |
888 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 889 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
889 AddFilter(new GamepadBrowserMessageFilter()); | 890 AddFilter(new GamepadBrowserMessageFilter()); |
| 891 AddFilter(new DeviceLightMessageFilter()); |
890 AddFilter(new DeviceMotionMessageFilter()); | 892 AddFilter(new DeviceMotionMessageFilter()); |
891 AddFilter(new DeviceOrientationMessageFilter()); | 893 AddFilter(new DeviceOrientationMessageFilter()); |
892 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 894 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
893 AddFilter(new HistogramMessageFilter()); | 895 AddFilter(new HistogramMessageFilter()); |
894 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 896 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
895 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 897 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
896 switches::kEnableMemoryBenchmarking)) | 898 switches::kEnableMemoryBenchmarking)) |
897 AddFilter(new MemoryBenchmarkMessageFilter()); | 899 AddFilter(new MemoryBenchmarkMessageFilter()); |
898 #endif | 900 #endif |
899 AddFilter(new VibrationMessageFilter()); | 901 AddFilter(new VibrationMessageFilter()); |
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 } | 2370 } |
2369 | 2371 |
2370 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2372 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
2371 gfx::GpuMemoryBufferType type, | 2373 gfx::GpuMemoryBufferType type, |
2372 const gfx::GpuMemoryBufferId& id) { | 2374 const gfx::GpuMemoryBufferId& id) { |
2373 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2375 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
2374 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2376 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
2375 } | 2377 } |
2376 | 2378 |
2377 } // namespace content | 2379 } // namespace content |
OLD | NEW |