Chromium Code Reviews| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 #include "content/browser/renderer_host/render_view_host_delegate.h" | 84 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 85 #include "content/browser/renderer_host/render_view_host_impl.h" | 85 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 86 #include "content/browser/renderer_host/render_widget_helper.h" | 86 #include "content/browser/renderer_host/render_widget_helper.h" |
| 87 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | 87 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" |
| 88 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 88 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| 89 #include "content/browser/resolve_proxy_msg_helper.h" | 89 #include "content/browser/resolve_proxy_msg_helper.h" |
| 90 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 90 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
| 91 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 91 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 92 #include "content/browser/storage_partition_impl.h" | 92 #include "content/browser/storage_partition_impl.h" |
| 93 #include "content/browser/tracing/trace_message_filter.h" | 93 #include "content/browser/tracing/trace_message_filter.h" |
| 94 #include "content/browser/vibration/vibration_browser_message_filter.h" | |
| 95 #include "content/browser/vibration/vibration_service_factory.h" | |
| 94 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 96 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 95 #include "content/browser/worker_host/worker_message_filter.h" | 97 #include "content/browser/worker_host/worker_message_filter.h" |
| 96 #include "content/browser/worker_host/worker_storage_partition.h" | 98 #include "content/browser/worker_host/worker_storage_partition.h" |
| 97 #include "content/common/child_process_host_impl.h" | 99 #include "content/common/child_process_host_impl.h" |
| 98 #include "content/common/child_process_messages.h" | 100 #include "content/common/child_process_messages.h" |
| 99 #include "content/common/gpu/gpu_messages.h" | 101 #include "content/common/gpu/gpu_messages.h" |
| 100 #include "content/common/resource_messages.h" | 102 #include "content/common/resource_messages.h" |
| 101 #include "content/common/view_messages.h" | 103 #include "content/common/view_messages.h" |
| 102 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 104 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
| 103 #include "content/public/browser/browser_context.h" | 105 #include "content/public/browser/browser_context.h" |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 703 GetContentClient()->browser()->CreateQuotaPermissionContext())); | 705 GetContentClient()->browser()->CreateQuotaPermissionContext())); |
| 704 channel_->AddFilter(new GamepadBrowserMessageFilter()); | 706 channel_->AddFilter(new GamepadBrowserMessageFilter()); |
| 705 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 707 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 706 channel_->AddFilter(new HistogramMessageFilter()); | 708 channel_->AddFilter(new HistogramMessageFilter()); |
| 707 channel_->AddFilter(new HyphenatorMessageFilter(this)); | 709 channel_->AddFilter(new HyphenatorMessageFilter(this)); |
| 708 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 710 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 709 if (CommandLine::ForCurrentProcess()->HasSwitch( | 711 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 710 switches::kEnableMemoryBenchmarking)) | 712 switches::kEnableMemoryBenchmarking)) |
| 711 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); | 713 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); |
| 712 #endif | 714 #endif |
| 715 channel_->AddFilter(new VibrationBrowserMessageFilter(NewVibrationService())); | |
|
Peter Beverloo
2013/06/13 11:27:45
It seems odd for the message filter to own the vib
Michael van Ouwerkerk
2013/06/18 14:39:23
Most of the above code gets the dependencies from
| |
| 713 } | 716 } |
| 714 | 717 |
| 715 int RenderProcessHostImpl::GetNextRoutingID() { | 718 int RenderProcessHostImpl::GetNextRoutingID() { |
| 716 return widget_helper_->GetNextRoutingID(); | 719 return widget_helper_->GetNextRoutingID(); |
| 717 } | 720 } |
| 718 | 721 |
| 719 void RenderProcessHostImpl::SimulateSwapOutACK( | 722 void RenderProcessHostImpl::SimulateSwapOutACK( |
| 720 const ViewMsg_SwapOut_Params& params) { | 723 const ViewMsg_SwapOut_Params& params) { |
| 721 widget_helper_->SimulateSwapOutACK(params); | 724 widget_helper_->SimulateSwapOutACK(params); |
| 722 } | 725 } |
| (...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1798 continue; | 1801 continue; |
| 1799 | 1802 |
| 1800 RenderViewHost* rvh = | 1803 RenderViewHost* rvh = |
| 1801 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); | 1804 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); |
| 1802 | 1805 |
| 1803 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1806 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
| 1804 } | 1807 } |
| 1805 } | 1808 } |
| 1806 | 1809 |
| 1807 } // namespace content | 1810 } // namespace content |
| OLD | NEW |