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 25 matching lines...) Expand all Loading... |
36 #include "base/threading/thread_restrictions.h" | 36 #include "base/threading/thread_restrictions.h" |
37 #include "base/tracked_objects.h" | 37 #include "base/tracked_objects.h" |
38 #include "cc/base/switches.h" | 38 #include "cc/base/switches.h" |
39 #include "content/browser/appcache/appcache_dispatcher_host.h" | 39 #include "content/browser/appcache/appcache_dispatcher_host.h" |
40 #include "content/browser/appcache/chrome_appcache_service.h" | 40 #include "content/browser/appcache/chrome_appcache_service.h" |
41 #include "content/browser/browser_main.h" | 41 #include "content/browser/browser_main.h" |
42 #include "content/browser/browser_main_loop.h" | 42 #include "content/browser/browser_main_loop.h" |
43 #include "content/browser/browser_plugin/browser_plugin_geolocation_permission_c
ontext.h" | 43 #include "content/browser/browser_plugin/browser_plugin_geolocation_permission_c
ontext.h" |
44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 44 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
45 #include "content/browser/child_process_security_policy_impl.h" | 45 #include "content/browser/child_process_security_policy_impl.h" |
| 46 #include "content/browser/device_orientation/device_motion_message_filter.h" |
| 47 #include "content/browser/device_orientation/device_orientation_message_filter.h
" |
46 #include "content/browser/device_orientation/orientation_message_filter.h" | 48 #include "content/browser/device_orientation/orientation_message_filter.h" |
47 #include "content/browser/dom_storage/dom_storage_context_impl.h" | 49 #include "content/browser/dom_storage/dom_storage_context_impl.h" |
48 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 50 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
49 #include "content/browser/download/mhtml_generation_manager.h" | 51 #include "content/browser/download/mhtml_generation_manager.h" |
50 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 52 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
51 #include "content/browser/fileapi/fileapi_message_filter.h" | 53 #include "content/browser/fileapi/fileapi_message_filter.h" |
52 #include "content/browser/geolocation/geolocation_dispatcher_host.h" | 54 #include "content/browser/geolocation/geolocation_dispatcher_host.h" |
53 #include "content/browser/gpu/gpu_data_manager_impl.h" | 55 #include "content/browser/gpu/gpu_data_manager_impl.h" |
54 #include "content/browser/gpu/gpu_process_host.h" | 56 #include "content/browser/gpu/gpu_process_host.h" |
55 #include "content/browser/gpu/shader_disk_cache.h" | 57 #include "content/browser/gpu/shader_disk_cache.h" |
56 #include "content/browser/histogram_message_filter.h" | 58 #include "content/browser/histogram_message_filter.h" |
57 #include "content/browser/indexed_db/indexed_db_context_impl.h" | 59 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
58 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" | 60 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" |
59 #include "content/browser/loader/resource_message_filter.h" | 61 #include "content/browser/loader/resource_message_filter.h" |
60 #include "content/browser/loader/resource_scheduler_filter.h" | 62 #include "content/browser/loader/resource_scheduler_filter.h" |
61 #include "content/browser/media/media_internals.h" | 63 #include "content/browser/media/media_internals.h" |
62 #include "content/browser/mime_registry_message_filter.h" | 64 #include "content/browser/mime_registry_message_filter.h" |
63 #include "content/browser/plugin_service_impl.h" | 65 #include "content/browser/plugin_service_impl.h" |
64 #include "content/browser/profiler_message_filter.h" | 66 #include "content/browser/profiler_message_filter.h" |
65 #include "content/browser/quota_dispatcher_host.h" | 67 #include "content/browser/quota_dispatcher_host.h" |
66 #include "content/browser/renderer_host/clipboard_message_filter.h" | 68 #include "content/browser/renderer_host/clipboard_message_filter.h" |
67 #include "content/browser/renderer_host/database_message_filter.h" | 69 #include "content/browser/renderer_host/database_message_filter.h" |
68 #include "content/browser/renderer_host/device_motion_browser_message_filter.h" | |
69 #include "content/browser/renderer_host/file_utilities_message_filter.h" | 70 #include "content/browser/renderer_host/file_utilities_message_filter.h" |
70 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" | 71 #include "content/browser/renderer_host/gamepad_browser_message_filter.h" |
71 #include "content/browser/renderer_host/gpu_message_filter.h" | 72 #include "content/browser/renderer_host/gpu_message_filter.h" |
72 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" | 73 #include "content/browser/renderer_host/media/audio_input_renderer_host.h" |
73 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" | 74 #include "content/browser/renderer_host/media/audio_mirroring_manager.h" |
74 #include "content/browser/renderer_host/media/audio_renderer_host.h" | 75 #include "content/browser/renderer_host/media/audio_renderer_host.h" |
75 #include "content/browser/renderer_host/media/device_request_message_filter.h" | 76 #include "content/browser/renderer_host/media/device_request_message_filter.h" |
76 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" | 77 #include "content/browser/renderer_host/media/media_stream_dispatcher_host.h" |
77 #include "content/browser/renderer_host/media/midi_dispatcher_host.h" | 78 #include "content/browser/renderer_host/media/midi_dispatcher_host.h" |
78 #include "content/browser/renderer_host/media/midi_host.h" | 79 #include "content/browser/renderer_host/media/midi_host.h" |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 #endif | 712 #endif |
712 | 713 |
713 channel_->AddFilter(new TraceMessageFilter()); | 714 channel_->AddFilter(new TraceMessageFilter()); |
714 channel_->AddFilter(new ResolveProxyMsgHelper( | 715 channel_->AddFilter(new ResolveProxyMsgHelper( |
715 browser_context->GetRequestContextForRenderProcess(GetID()))); | 716 browser_context->GetRequestContextForRenderProcess(GetID()))); |
716 channel_->AddFilter(new QuotaDispatcherHost( | 717 channel_->AddFilter(new QuotaDispatcherHost( |
717 GetID(), | 718 GetID(), |
718 storage_partition_impl_->GetQuotaManager(), | 719 storage_partition_impl_->GetQuotaManager(), |
719 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 720 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
720 channel_->AddFilter(new GamepadBrowserMessageFilter()); | 721 channel_->AddFilter(new GamepadBrowserMessageFilter()); |
721 channel_->AddFilter(new DeviceMotionBrowserMessageFilter()); | 722 channel_->AddFilter(new DeviceMotionMessageFilter()); |
| 723 channel_->AddFilter(new DeviceOrientationMessageFilter()); |
722 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 724 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
723 channel_->AddFilter(new HistogramMessageFilter()); | 725 channel_->AddFilter(new HistogramMessageFilter()); |
724 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 726 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
725 if (CommandLine::ForCurrentProcess()->HasSwitch( | 727 if (CommandLine::ForCurrentProcess()->HasSwitch( |
726 switches::kEnableMemoryBenchmarking)) | 728 switches::kEnableMemoryBenchmarking)) |
727 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); | 729 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); |
728 #endif | 730 #endif |
729 #if defined(OS_ANDROID) | 731 #if defined(OS_ANDROID) |
730 channel_->AddFilter(new VibrationMessageFilter()); | 732 channel_->AddFilter(new VibrationMessageFilter()); |
731 #endif | 733 #endif |
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 // Skip widgets in other processes. | 1804 // Skip widgets in other processes. |
1803 if (widgets[i]->GetProcess()->GetID() != GetID()) | 1805 if (widgets[i]->GetProcess()->GetID() != GetID()) |
1804 continue; | 1806 continue; |
1805 | 1807 |
1806 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); | 1808 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); |
1807 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1809 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
1808 } | 1810 } |
1809 } | 1811 } |
1810 | 1812 |
1811 } // namespace content | 1813 } // namespace content |
OLD | NEW |