OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 #include "third_party/WebKit/public/public_features.h" | 197 #include "third_party/WebKit/public/public_features.h" |
198 #include "third_party/skia/include/core/SkBitmap.h" | 198 #include "third_party/skia/include/core/SkBitmap.h" |
199 #include "ui/base/ui_base_switches.h" | 199 #include "ui/base/ui_base_switches.h" |
200 #include "ui/display/display_switches.h" | 200 #include "ui/display/display_switches.h" |
201 #include "ui/gfx/switches.h" | 201 #include "ui/gfx/switches.h" |
202 #include "ui/gl/gl_switches.h" | 202 #include "ui/gl/gl_switches.h" |
203 #include "ui/gl/gpu_switching_manager.h" | 203 #include "ui/gl/gpu_switching_manager.h" |
204 #include "ui/native_theme/native_theme_switches.h" | 204 #include "ui/native_theme/native_theme_switches.h" |
205 | 205 |
206 #if defined(OS_ANDROID) | 206 #if defined(OS_ANDROID) |
207 #include "content/browser/screen_orientation/screen_orientation_listener_android
.h" | |
208 #include "content/public/browser/android/java_interfaces.h" | 207 #include "content/public/browser/android/java_interfaces.h" |
209 #include "ipc/ipc_sync_channel.h" | 208 #include "ipc/ipc_sync_channel.h" |
210 #include "media/audio/android/audio_manager_android.h" | 209 #include "media/audio/android/audio_manager_android.h" |
211 #endif | 210 #endif |
212 | 211 |
213 #if defined(OS_WIN) | 212 #if defined(OS_WIN) |
214 #include "base/win/scoped_com_initializer.h" | 213 #include "base/win/scoped_com_initializer.h" |
215 #include "base/win/windows_version.h" | 214 #include "base/win/windows_version.h" |
216 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" | 215 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
217 #include "content/common/font_cache_dispatcher_win.h" | 216 #include "content/common/font_cache_dispatcher_win.h" |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), | 1185 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), |
1187 resource_context, service_worker_context, browser_context); | 1186 resource_context, service_worker_context, browser_context); |
1188 AddFilter(notification_message_filter_.get()); | 1187 AddFilter(notification_message_filter_.get()); |
1189 | 1188 |
1190 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 1189 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
1191 AddFilter(new HistogramMessageFilter()); | 1190 AddFilter(new HistogramMessageFilter()); |
1192 AddFilter(new MemoryMessageFilter(this)); | 1191 AddFilter(new MemoryMessageFilter(this)); |
1193 AddFilter(new PushMessagingMessageFilter( | 1192 AddFilter(new PushMessagingMessageFilter( |
1194 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 1193 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
1195 #if defined(OS_ANDROID) | 1194 #if defined(OS_ANDROID) |
1196 AddFilter(new ScreenOrientationListenerAndroid()); | |
1197 synchronous_compositor_filter_ = | 1195 synchronous_compositor_filter_ = |
1198 new SynchronousCompositorBrowserFilter(GetID()); | 1196 new SynchronousCompositorBrowserFilter(GetID()); |
1199 AddFilter(synchronous_compositor_filter_.get()); | 1197 AddFilter(synchronous_compositor_filter_.get()); |
1200 #endif | 1198 #endif |
1201 } | 1199 } |
1202 | 1200 |
1203 void RenderProcessHostImpl::RegisterMojoInterfaces() { | 1201 void RenderProcessHostImpl::RegisterMojoInterfaces() { |
1204 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( | 1202 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( |
1205 service_manager::mojom::kServiceManager_ConnectorSpec); | 1203 service_manager::mojom::kServiceManager_ConnectorSpec); |
1206 | 1204 |
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3071 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3069 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3072 | 3070 |
3073 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3071 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3074 // Capture the error message in a crash key value. | 3072 // Capture the error message in a crash key value. |
3075 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3073 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3076 bad_message::ReceivedBadMessage(render_process_id, | 3074 bad_message::ReceivedBadMessage(render_process_id, |
3077 bad_message::RPH_MOJO_PROCESS_ERROR); | 3075 bad_message::RPH_MOJO_PROCESS_ERROR); |
3078 } | 3076 } |
3079 | 3077 |
3080 } // namespace content | 3078 } // namespace content |
OLD | NEW |