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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 #include "ipc/ipc_switches.h" | 125 #include "ipc/ipc_switches.h" |
126 #include "media/base/media_switches.h" | 126 #include "media/base/media_switches.h" |
127 #include "net/url_request/url_request_context_getter.h" | 127 #include "net/url_request/url_request_context_getter.h" |
128 #include "ppapi/shared_impl/ppapi_switches.h" | 128 #include "ppapi/shared_impl/ppapi_switches.h" |
129 #include "ui/base/ui_base_switches.h" | 129 #include "ui/base/ui_base_switches.h" |
130 #include "ui/gl/gl_switches.h" | 130 #include "ui/gl/gl_switches.h" |
131 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" | 131 #include "webkit/browser/fileapi/sandbox_file_system_backend.h" |
132 #include "webkit/glue/resource_type.h" | 132 #include "webkit/glue/resource_type.h" |
133 #include "webkit/plugins/plugin_switches.h" | 133 #include "webkit/plugins/plugin_switches.h" |
134 | 134 |
| 135 #if defined(OS_ANDROID) |
| 136 #include "content/browser/android/vibration_message_filter.h" |
| 137 #endif |
| 138 |
135 #if defined(OS_WIN) | 139 #if defined(OS_WIN) |
136 #include "base/win/scoped_com_initializer.h" | 140 #include "base/win/scoped_com_initializer.h" |
137 #include "content/common/font_cache_dispatcher_win.h" | 141 #include "content/common/font_cache_dispatcher_win.h" |
138 #include "content/common/sandbox_win.h" | 142 #include "content/common/sandbox_win.h" |
139 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 143 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
140 #endif | 144 #endif |
141 | 145 |
142 #if defined(ENABLE_WEBRTC) | 146 #if defined(ENABLE_WEBRTC) |
143 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 147 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
144 #endif | 148 #endif |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 channel_->AddFilter(new GamepadBrowserMessageFilter()); | 712 channel_->AddFilter(new GamepadBrowserMessageFilter()); |
709 channel_->AddFilter(new DeviceMotionBrowserMessageFilter()); | 713 channel_->AddFilter(new DeviceMotionBrowserMessageFilter()); |
710 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 714 channel_->AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
711 channel_->AddFilter(new HistogramMessageFilter()); | 715 channel_->AddFilter(new HistogramMessageFilter()); |
712 channel_->AddFilter(new HyphenatorMessageFilter(this)); | 716 channel_->AddFilter(new HyphenatorMessageFilter(this)); |
713 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) | 717 #if defined(USE_TCMALLOC) && (defined(OS_LINUX) || defined(OS_ANDROID)) |
714 if (CommandLine::ForCurrentProcess()->HasSwitch( | 718 if (CommandLine::ForCurrentProcess()->HasSwitch( |
715 switches::kEnableMemoryBenchmarking)) | 719 switches::kEnableMemoryBenchmarking)) |
716 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); | 720 channel_->AddFilter(new MemoryBenchmarkMessageFilter()); |
717 #endif | 721 #endif |
| 722 #if defined(OS_ANDROID) |
| 723 channel_->AddFilter(new VibrationMessageFilter()); |
| 724 #endif |
718 } | 725 } |
719 | 726 |
720 int RenderProcessHostImpl::GetNextRoutingID() { | 727 int RenderProcessHostImpl::GetNextRoutingID() { |
721 return widget_helper_->GetNextRoutingID(); | 728 return widget_helper_->GetNextRoutingID(); |
722 } | 729 } |
723 | 730 |
724 | 731 |
725 void RenderProcessHostImpl::ResumeDeferredNavigation( | 732 void RenderProcessHostImpl::ResumeDeferredNavigation( |
726 const GlobalRequestID& request_id) { | 733 const GlobalRequestID& request_id) { |
727 widget_helper_->ResumeDeferredNavigation(request_id); | 734 widget_helper_->ResumeDeferredNavigation(request_id); |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 // Skip widgets in other processes. | 1789 // Skip widgets in other processes. |
1783 if (widgets[i]->GetProcess()->GetID() != GetID()) | 1790 if (widgets[i]->GetProcess()->GetID() != GetID()) |
1784 continue; | 1791 continue; |
1785 | 1792 |
1786 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); | 1793 RenderViewHost* rvh = RenderViewHost::From(widgets[i]); |
1787 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1794 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
1788 } | 1795 } |
1789 } | 1796 } |
1790 | 1797 |
1791 } // namespace content | 1798 } // namespace content |
OLD | NEW |