| 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 26 matching lines...) Expand all Loading... |
| 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_message_filter.h" | 43 #include "content/browser/browser_plugin/browser_plugin_message_filter.h" |
| 44 #include "content/browser/child_process_security_policy_impl.h" | 44 #include "content/browser/child_process_security_policy_impl.h" |
| 45 #include "content/browser/device_sensors/device_motion_message_filter.h" | 45 #include "content/browser/device_sensors/device_motion_message_filter.h" |
| 46 #include "content/browser/device_sensors/device_orientation_message_filter.h" | 46 #include "content/browser/device_sensors/device_orientation_message_filter.h" |
| 47 #include "content/browser/battery_status/battery_status_message_filter.h" |
| 48 |
| 47 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 49 #include "content/browser/dom_storage/dom_storage_context_wrapper.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/frame_host/render_frame_message_filter.h" | 54 #include "content/browser/frame_host/render_frame_message_filter.h" |
| 53 #include "content/browser/gpu/compositor_util.h" | 55 #include "content/browser/gpu/compositor_util.h" |
| 54 #include "content/browser/gpu/gpu_data_manager_impl.h" | 56 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 55 #include "content/browser/gpu/gpu_process_host.h" | 57 #include "content/browser/gpu/gpu_process_host.h" |
| 56 #include "content/browser/gpu/shader_disk_cache.h" | 58 #include "content/browser/gpu/shader_disk_cache.h" |
| (...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 AddFilter(new TraceMessageFilter()); | 806 AddFilter(new TraceMessageFilter()); |
| 805 AddFilter(new ResolveProxyMsgHelper( | 807 AddFilter(new ResolveProxyMsgHelper( |
| 806 browser_context->GetRequestContextForRenderProcess(GetID()))); | 808 browser_context->GetRequestContextForRenderProcess(GetID()))); |
| 807 AddFilter(new QuotaDispatcherHost( | 809 AddFilter(new QuotaDispatcherHost( |
| 808 GetID(), | 810 GetID(), |
| 809 storage_partition_impl_->GetQuotaManager(), | 811 storage_partition_impl_->GetQuotaManager(), |
| 810 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 812 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 811 AddFilter(new GamepadBrowserMessageFilter()); | 813 AddFilter(new GamepadBrowserMessageFilter()); |
| 812 AddFilter(new DeviceMotionMessageFilter()); | 814 AddFilter(new DeviceMotionMessageFilter()); |
| 813 AddFilter(new DeviceOrientationMessageFilter()); | 815 AddFilter(new DeviceOrientationMessageFilter()); |
| 816 AddFilter(new BatteryStatusMessageFilter()); |
| 814 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 817 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 815 AddFilter(new HistogramMessageFilter()); | 818 AddFilter(new HistogramMessageFilter()); |
| 816 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 819 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 817 if (CommandLine::ForCurrentProcess()->HasSwitch( | 820 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 818 switches::kEnableMemoryBenchmarking)) | 821 switches::kEnableMemoryBenchmarking)) |
| 819 AddFilter(new MemoryBenchmarkMessageFilter()); | 822 AddFilter(new MemoryBenchmarkMessageFilter()); |
| 820 #endif | 823 #endif |
| 821 AddFilter(new VibrationMessageFilter()); | 824 AddFilter(new VibrationMessageFilter()); |
| 822 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); | 825 screen_orientation_dispatcher_host_ = new ScreenOrientationDispatcherHost(); |
| 823 AddFilter(screen_orientation_dispatcher_host_); | 826 AddFilter(screen_orientation_dispatcher_host_); |
| (...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 | 2122 |
| 2120 void RenderProcessHostImpl::SetWebUIHandle( | 2123 void RenderProcessHostImpl::SetWebUIHandle( |
| 2121 int32 view_routing_id, | 2124 int32 view_routing_id, |
| 2122 mojo::ScopedMessagePipeHandle handle) { | 2125 mojo::ScopedMessagePipeHandle handle) { |
| 2123 if (!render_process_host_mojo_) | 2126 if (!render_process_host_mojo_) |
| 2124 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); | 2127 render_process_host_mojo_.reset(new RenderProcessHostMojoImpl(this)); |
| 2125 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); | 2128 render_process_host_mojo_->SetWebUIHandle(view_routing_id, handle.Pass()); |
| 2126 } | 2129 } |
| 2127 | 2130 |
| 2128 } // namespace content | 2131 } // namespace content |
| OLD | NEW |