| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "content/browser/bad_message.h" | 52 #include "content/browser/bad_message.h" |
| 53 #include "content/browser/blob_storage/blob_dispatcher_host.h" | 53 #include "content/browser/blob_storage/blob_dispatcher_host.h" |
| 54 #include "content/browser/blob_storage/chrome_blob_storage_context.h" | 54 #include "content/browser/blob_storage/chrome_blob_storage_context.h" |
| 55 #include "content/browser/browser_child_process_host_impl.h" | 55 #include "content/browser/browser_child_process_host_impl.h" |
| 56 #include "content/browser/browser_main.h" | 56 #include "content/browser/browser_main.h" |
| 57 #include "content/browser/browser_main_loop.h" | 57 #include "content/browser/browser_main_loop.h" |
| 58 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" | 58 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 59 #include "content/browser/cache_storage/cache_storage_context_impl.h" | 59 #include "content/browser/cache_storage/cache_storage_context_impl.h" |
| 60 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" | 60 #include "content/browser/cache_storage/cache_storage_dispatcher_host.h" |
| 61 #include "content/browser/child_process_security_policy_impl.h" | 61 #include "content/browser/child_process_security_policy_impl.h" |
| 62 #include "content/browser/device_sensors/device_light_message_filter.h" | 62 #include "content/browser/device_sensors/device_sensor_host.h" |
| 63 #include "content/browser/device_sensors/device_motion_message_filter.h" | |
| 64 #include "content/browser/device_sensors/device_orientation_absolute_message_fil
ter.h" | |
| 65 #include "content/browser/device_sensors/device_orientation_message_filter.h" | |
| 66 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 63 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 67 #include "content/browser/dom_storage/dom_storage_message_filter.h" | 64 #include "content/browser/dom_storage/dom_storage_message_filter.h" |
| 68 #include "content/browser/fileapi/fileapi_message_filter.h" | 65 #include "content/browser/fileapi/fileapi_message_filter.h" |
| 69 #include "content/browser/frame_host/render_frame_message_filter.h" | 66 #include "content/browser/frame_host/render_frame_message_filter.h" |
| 70 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 67 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
| 71 #include "content/browser/gpu/compositor_util.h" | 68 #include "content/browser/gpu/compositor_util.h" |
| 72 #include "content/browser/gpu/gpu_data_manager_impl.h" | 69 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 73 #include "content/browser/gpu/gpu_process_host.h" | 70 #include "content/browser/gpu/gpu_process_host.h" |
| 74 #include "content/browser/gpu/shader_disk_cache.h" | 71 #include "content/browser/gpu/shader_disk_cache.h" |
| 75 #include "content/browser/histogram_message_filter.h" | 72 #include "content/browser/histogram_message_filter.h" |
| (...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 AddFilter(new QuotaDispatcherHost( | 1003 AddFilter(new QuotaDispatcherHost( |
| 1007 GetID(), storage_partition_impl_->GetQuotaManager(), | 1004 GetID(), storage_partition_impl_->GetQuotaManager(), |
| 1008 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 1005 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 1009 | 1006 |
| 1010 notification_message_filter_ = new NotificationMessageFilter( | 1007 notification_message_filter_ = new NotificationMessageFilter( |
| 1011 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), | 1008 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), |
| 1012 resource_context, browser_context); | 1009 resource_context, browser_context); |
| 1013 AddFilter(notification_message_filter_.get()); | 1010 AddFilter(notification_message_filter_.get()); |
| 1014 | 1011 |
| 1015 AddFilter(new GamepadBrowserMessageFilter()); | 1012 AddFilter(new GamepadBrowserMessageFilter()); |
| 1016 AddFilter(new DeviceLightMessageFilter()); | |
| 1017 AddFilter(new DeviceMotionMessageFilter()); | |
| 1018 AddFilter(new DeviceOrientationMessageFilter()); | |
| 1019 AddFilter(new DeviceOrientationAbsoluteMessageFilter()); | |
| 1020 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 1013 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 1021 AddFilter(new HistogramMessageFilter()); | 1014 AddFilter(new HistogramMessageFilter()); |
| 1022 AddFilter(new MemoryMessageFilter(this)); | 1015 AddFilter(new MemoryMessageFilter(this)); |
| 1023 AddFilter(new PushMessagingMessageFilter( | 1016 AddFilter(new PushMessagingMessageFilter( |
| 1024 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 1017 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 1025 #if defined(OS_ANDROID) | 1018 #if defined(OS_ANDROID) |
| 1026 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 1019 AddFilter(new ScreenOrientationMessageFilterAndroid()); |
| 1027 #endif | 1020 #endif |
| 1028 } | 1021 } |
| 1029 | 1022 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1086 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); | 1079 storage_partition_impl_->GetPlatformNotificationContext()), GetID())); |
| 1087 | 1080 |
| 1088 mojo_application_host_->service_registry()->AddService( | 1081 mojo_application_host_->service_registry()->AddService( |
| 1089 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, | 1082 base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService, |
| 1090 base::Unretained(this))); | 1083 base::Unretained(this))); |
| 1091 | 1084 |
| 1092 mojo_application_host_->service_registry()->AddService( | 1085 mojo_application_host_->service_registry()->AddService( |
| 1093 base::Bind(&MimeRegistryImpl::Create), | 1086 base::Bind(&MimeRegistryImpl::Create), |
| 1094 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); | 1087 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| 1095 | 1088 |
| 1089 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner = |
| 1090 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); |
| 1091 mojo_application_host_->service_registry()->AddService( |
| 1092 base::Bind(&DeviceLightHost::Create), io_task_runner); |
| 1093 mojo_application_host_->service_registry()->AddService( |
| 1094 base::Bind(&DeviceMotionHost::Create), io_task_runner); |
| 1095 mojo_application_host_->service_registry()->AddService( |
| 1096 base::Bind(&DeviceOrientationHost::Create), io_task_runner); |
| 1097 mojo_application_host_->service_registry()->AddService( |
| 1098 base::Bind(&DeviceOrientationAbsoluteHost::Create), io_task_runner); |
| 1099 |
| 1096 #if defined(OS_ANDROID) | 1100 #if defined(OS_ANDROID) |
| 1097 ServiceRegistrarAndroid::RegisterProcessHostServices( | 1101 ServiceRegistrarAndroid::RegisterProcessHostServices( |
| 1098 mojo_application_host_->service_registry_android()); | 1102 mojo_application_host_->service_registry_android()); |
| 1099 #endif | 1103 #endif |
| 1100 | 1104 |
| 1101 GetContentClient()->browser()->RegisterRenderProcessMojoServices( | 1105 GetContentClient()->browser()->RegisterRenderProcessMojoServices( |
| 1102 mojo_application_host_->service_registry()); | 1106 mojo_application_host_->service_registry()); |
| 1103 } | 1107 } |
| 1104 | 1108 |
| 1105 void RenderProcessHostImpl::CreateStoragePartitionService( | 1109 void RenderProcessHostImpl::CreateStoragePartitionService( |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2802 | 2806 |
| 2803 // Skip widgets in other processes. | 2807 // Skip widgets in other processes. |
| 2804 if (rvh->GetProcess()->GetID() != GetID()) | 2808 if (rvh->GetProcess()->GetID() != GetID()) |
| 2805 continue; | 2809 continue; |
| 2806 | 2810 |
| 2807 rvh->OnWebkitPreferencesChanged(); | 2811 rvh->OnWebkitPreferencesChanged(); |
| 2808 } | 2812 } |
| 2809 } | 2813 } |
| 2810 | 2814 |
| 2811 } // namespace content | 2815 } // namespace content |
| OLD | NEW |