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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 90 #include "content/browser/renderer_host/render_widget_helper.h" | 90 #include "content/browser/renderer_host/render_widget_helper.h" |
| 91 #include "content/browser/renderer_host/render_widget_host_impl.h" | 91 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 92 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" | 92 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" |
| 93 #include "content/browser/renderer_host/text_input_client_message_filter.h" | 93 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
| 94 #include "content/browser/resolve_proxy_msg_helper.h" | 94 #include "content/browser/resolve_proxy_msg_helper.h" |
| 95 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" | 95 #include "content/browser/speech/input_tag_speech_dispatcher_host.h" |
| 96 #include "content/browser/speech/speech_recognition_dispatcher_host.h" | 96 #include "content/browser/speech/speech_recognition_dispatcher_host.h" |
| 97 #include "content/browser/storage_partition_impl.h" | 97 #include "content/browser/storage_partition_impl.h" |
| 98 #include "content/browser/streams/stream_context.h" | 98 #include "content/browser/streams/stream_context.h" |
| 99 #include "content/browser/tracing/trace_message_filter.h" | 99 #include "content/browser/tracing/trace_message_filter.h" |
| 100 #include "content/browser/vibration_message_filter.h" | |
| 100 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 101 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
| 101 #include "content/browser/worker_host/worker_message_filter.h" | 102 #include "content/browser/worker_host/worker_message_filter.h" |
| 102 #include "content/browser/worker_host/worker_storage_partition.h" | 103 #include "content/browser/worker_host/worker_storage_partition.h" |
| 103 #include "content/common/child_process_host_impl.h" | 104 #include "content/common/child_process_host_impl.h" |
| 104 #include "content/common/child_process_messages.h" | 105 #include "content/common/child_process_messages.h" |
| 105 #include "content/common/gpu/gpu_messages.h" | 106 #include "content/common/gpu/gpu_messages.h" |
| 106 #include "content/common/resource_messages.h" | 107 #include "content/common/resource_messages.h" |
| 107 #include "content/common/view_messages.h" | 108 #include "content/common/view_messages.h" |
| 108 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" | 109 #include "content/port/browser/render_widget_host_view_frame_subscriber.h" |
| 109 #include "content/public/browser/browser_context.h" | 110 #include "content/public/browser/browser_context.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 125 #include "ipc/ipc_platform_file.h" | 126 #include "ipc/ipc_platform_file.h" |
| 126 #include "ipc/ipc_switches.h" | 127 #include "ipc/ipc_switches.h" |
| 127 #include "media/base/media_switches.h" | 128 #include "media/base/media_switches.h" |
| 128 #include "net/url_request/url_request_context_getter.h" | 129 #include "net/url_request/url_request_context_getter.h" |
| 129 #include "ppapi/shared_impl/ppapi_switches.h" | 130 #include "ppapi/shared_impl/ppapi_switches.h" |
| 130 #include "ui/base/ui_base_switches.h" | 131 #include "ui/base/ui_base_switches.h" |
| 131 #include "ui/gl/gl_switches.h" | 132 #include "ui/gl/gl_switches.h" |
| 132 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 133 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
| 133 #include "webkit/common/resource_type.h" | 134 #include "webkit/common/resource_type.h" |
| 134 | 135 |
| 135 #if defined(OS_ANDROID) | |
| 136 #include "content/browser/android/vibration_message_filter.h" | |
| 137 #endif | |
| 138 | |
| 139 #if defined(OS_WIN) | 136 #if defined(OS_WIN) |
| 140 #include "base/win/scoped_com_initializer.h" | 137 #include "base/win/scoped_com_initializer.h" |
| 141 #include "content/common/font_cache_dispatcher_win.h" | 138 #include "content/common/font_cache_dispatcher_win.h" |
| 142 #include "content/common/sandbox_win.h" | 139 #include "content/common/sandbox_win.h" |
| 143 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 140 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
| 144 #endif | 141 #endif |
| 145 | 142 |
| 146 #if defined(ENABLE_WEBRTC) | 143 #if defined(ENABLE_WEBRTC) |
| 147 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 144 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
| 148 #endif | 145 #endif |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 689 channel_->AddFilter(new GamepadBrowserMessageFilter()); | 686 channel_->AddFilter(new GamepadBrowserMessageFilter()); |
| 690 channel_->AddFilter(new DeviceMotionMessageFilter()); | 687 channel_->AddFilter(new DeviceMotionMessageFilter()); |
| 691 channel_->AddFilter(new DeviceOrientationMessageFilter()); | 688 channel_->AddFilter(new DeviceOrientationMessageFilter()); |
| 692 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 689 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 693 channel_->AddFilter(new HistogramMessageFilter()); | 690 channel_->AddFilter(new HistogramMessageFilter()); |
| 694 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 691 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
| 695 if (CommandLine::ForCurrentProcess()->HasSwitch( | 692 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 696 switches::kEnableMemoryBenchmarking)) | 693 switches::kEnableMemoryBenchmarking)) |
| 697 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); | 694 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); |
| 698 #endif | 695 #endif |
| 699 #if defined(OS_ANDROID) | 696 VibrationMessageFilter* vibra_filter = VibrationMessageFilter::Create(); |
|
Avi (use Gerrit)
2013/09/12 05:05:58
You can spell out "vibration".
| |
| 700 channel_->AddFilter(new VibrationMessageFilter()); | 697 if (vibra_filter) |
| 701 #endif | 698 channel_->AddFilter(vibra_filter); |
| 702 } | 699 } |
| 703 | 700 |
| 704 int RenderProcessHostImpl::GetNextRoutingID() { | 701 int RenderProcessHostImpl::GetNextRoutingID() { |
| 705 return widget_helper_->GetNextRoutingID(); | 702 return widget_helper_->GetNextRoutingID(); |
| 706 } | 703 } |
| 707 | 704 |
| 708 | 705 |
| 709 void RenderProcessHostImpl::ResumeDeferredNavigation( | 706 void RenderProcessHostImpl::ResumeDeferredNavigation( |
| 710 const GlobalRequestID& request_id) { | 707 const GlobalRequestID& request_id) { |
| 711 widget_helper_->ResumeDeferredNavigation(request_id); | 708 widget_helper_->ResumeDeferredNavigation(request_id); |
| (...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1779 // Skip widgets in other processes. | 1776 // Skip widgets in other processes. |
| 1780 if (widgets[i]->GetProcess()->GetID() != GetID()) | 1777 if (widgets[i]->GetProcess()->GetID() != GetID()) |
| 1781 continue; | 1778 continue; |
| 1782 | 1779 |
| 1783 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); | 1780 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); |
| 1784 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1781 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
| 1785 } | 1782 } |
| 1786 } | 1783 } |
| 1787 | 1784 |
| 1788 } // namespace content | 1785 } // namespace content |
| OLD | NEW |