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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | 94 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" |
95 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 95 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
96 #include "content/browser/resolve_proxy_msg_helper.h" | 96 #include "content/browser/resolve_proxy_msg_helper.h" |
97 #include "content/browser/service_worker/service_worker_context.h" | 97 #include "content/browser/service_worker/service_worker_context.h" |
98 #include "content/browser/service_worker/service_worker_dispatcher_host.h" | 98 #include "content/browser/service_worker/service_worker_dispatcher_host.h" |
99 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 99 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
100 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 100 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
101 #include "content/browser/storage_partition_impl.h" | 101 #include "content/browser/storage_partition_impl.h" |
102 #include "content/browser/streams/stream_context.h" | 102 #include "content/browser/streams/stream_context.h" |
103 #include "content/browser/tracing/trace_message_filter.h" | 103 #include "content/browser/tracing/trace_message_filter.h" |
| 104 #include "content/browser/vibration/vibration_dispatcher_host.h" |
104 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 105 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
105 #include "content/browser/worker_host/worker_message_filter.h" | 106 #include "content/browser/worker_host/worker_message_filter.h" |
106 #include "content/browser/worker_host/worker_storage_partition.h" | 107 #include "content/browser/worker_host/worker_storage_partition.h" |
107 #include "content/common/child_process_host_impl.h" | 108 #include "content/common/child_process_host_impl.h" |
108 #include "content/common/child_process_messages.h" | 109 #include "content/common/child_process_messages.h" |
109 #include "content/common/gpu/gpu_messages.h" | 110 #include "content/common/gpu/gpu_messages.h" |
110 #include "content/common/resource_messages.h" | 111 #include "content/common/resource_messages.h" |
111 #include "content/common/view_messages.h" | 112 #include "content/common/view_messages.h" |
112 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 113 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
113 #include "content/public/browser/browser_context.h" | 114 #include "content/public/browser/browser_context.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 AddFilter(new GamepadBrowserMessageFilter()); | 704 AddFilter(new GamepadBrowserMessageFilter()); |
704 AddFilter(new DeviceMotionMessageFilter()); | 705 AddFilter(new DeviceMotionMessageFilter()); |
705 AddFilter(new DeviceOrientationMessageFilter()); | 706 AddFilter(new DeviceOrientationMessageFilter()); |
706 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 707 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
707 AddFilter(new HistogramMessageFilter()); | 708 AddFilter(new HistogramMessageFilter()); |
708 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 709 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
709 if (CommandLine::ForCurrentProcess()->HasSwitch( | 710 if (CommandLine::ForCurrentProcess()->HasSwitch( |
710 switches::kEnableMemoryBenchmarking)) | 711 switches::kEnableMemoryBenchmarking)) |
711 AddFilter(new MemoryBenchmarkMessageFilter()); | 712 AddFilter(new MemoryBenchmarkMessageFilter()); |
712 #endif | 713 #endif |
713 #if defined(OS_ANDROID) | 714 AddFilter(VibrationDispatcherHost::New()); |
714 AddFilter(new VibrationMessageFilter()); | |
715 #endif | |
716 } | 715 } |
717 | 716 |
718 int RenderProcessHostImpl::GetNextRoutingID() { | 717 int RenderProcessHostImpl::GetNextRoutingID() { |
719 return widget_helper_->GetNextRoutingID(); | 718 return widget_helper_->GetNextRoutingID(); |
720 } | 719 } |
721 | 720 |
722 | 721 |
723 void RenderProcessHostImpl::ResumeDeferredNavigation( | 722 void RenderProcessHostImpl::ResumeDeferredNavigation( |
724 const GlobalRequestID& request_id) { | 723 const GlobalRequestID& request_id) { |
725 widget_helper_->ResumeDeferredNavigation(request_id); | 724 widget_helper_->ResumeDeferredNavigation(request_id); |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 // Skip widgets in other processes. | 1803 // Skip widgets in other processes. |
1805 if (widget->GetProcess()->GetID() != GetID()) | 1804 if (widget->GetProcess()->GetID() != GetID()) |
1806 continue; | 1805 continue; |
1807 | 1806 |
1808 RenderViewHost* rvh = RenderViewHost::From(widget); | 1807 RenderViewHost* rvh = RenderViewHost::From(widget); |
1809 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1808 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
1810 } | 1809 } |
1811 } | 1810 } |
1812 | 1811 |
1813 } // namespace content | 1812 } // namespace content |
OLD | NEW |