| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 #include "third_party/skia/include/core/SkBitmap.h" | 190 #include "third_party/skia/include/core/SkBitmap.h" |
| 191 #include "ui/base/ui_base_switches.h" | 191 #include "ui/base/ui_base_switches.h" |
| 192 #include "ui/display/display_switches.h" | 192 #include "ui/display/display_switches.h" |
| 193 #include "ui/gfx/switches.h" | 193 #include "ui/gfx/switches.h" |
| 194 #include "ui/gl/gl_switches.h" | 194 #include "ui/gl/gl_switches.h" |
| 195 #include "ui/gl/gpu_switching_manager.h" | 195 #include "ui/gl/gpu_switching_manager.h" |
| 196 #include "ui/native_theme/native_theme_switches.h" | 196 #include "ui/native_theme/native_theme_switches.h" |
| 197 | 197 |
| 198 #if defined(OS_ANDROID) | 198 #if defined(OS_ANDROID) |
| 199 #include "content/browser/android/child_process_launcher_android.h" | 199 #include "content/browser/android/child_process_launcher_android.h" |
| 200 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" | 200 #include "content/browser/screen_orientation/screen_orientation_listener_android
.h" |
| 201 #include "content/public/browser/android/java_interfaces.h" | 201 #include "content/public/browser/android/java_interfaces.h" |
| 202 #include "ipc/ipc_sync_channel.h" | 202 #include "ipc/ipc_sync_channel.h" |
| 203 #include "media/audio/android/audio_manager_android.h" | 203 #include "media/audio/android/audio_manager_android.h" |
| 204 #endif | 204 #endif |
| 205 | 205 |
| 206 #if defined(OS_WIN) | 206 #if defined(OS_WIN) |
| 207 #include "base/win/scoped_com_initializer.h" | 207 #include "base/win/scoped_com_initializer.h" |
| 208 #include "base/win/windows_version.h" | 208 #include "base/win/windows_version.h" |
| 209 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" | 209 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
| 210 #include "content/common/font_cache_dispatcher_win.h" | 210 #include "content/common/font_cache_dispatcher_win.h" |
| (...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), | 1170 GetID(), storage_partition_impl_->GetPlatformNotificationContext(), |
| 1171 resource_context, service_worker_context, browser_context); | 1171 resource_context, service_worker_context, browser_context); |
| 1172 AddFilter(notification_message_filter_.get()); | 1172 AddFilter(notification_message_filter_.get()); |
| 1173 | 1173 |
| 1174 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); | 1174 AddFilter(new ProfilerMessageFilter(PROCESS_TYPE_RENDERER)); |
| 1175 AddFilter(new HistogramMessageFilter()); | 1175 AddFilter(new HistogramMessageFilter()); |
| 1176 AddFilter(new MemoryMessageFilter(this)); | 1176 AddFilter(new MemoryMessageFilter(this)); |
| 1177 AddFilter(new PushMessagingMessageFilter( | 1177 AddFilter(new PushMessagingMessageFilter( |
| 1178 GetID(), storage_partition_impl_->GetServiceWorkerContext())); | 1178 GetID(), storage_partition_impl_->GetServiceWorkerContext())); |
| 1179 #if defined(OS_ANDROID) | 1179 #if defined(OS_ANDROID) |
| 1180 AddFilter(new ScreenOrientationMessageFilterAndroid()); | 1180 AddFilter(new ScreenOrientationListenerAndroid()); |
| 1181 synchronous_compositor_filter_ = | 1181 synchronous_compositor_filter_ = |
| 1182 new SynchronousCompositorBrowserFilter(GetID()); | 1182 new SynchronousCompositorBrowserFilter(GetID()); |
| 1183 AddFilter(synchronous_compositor_filter_.get()); | 1183 AddFilter(synchronous_compositor_filter_.get()); |
| 1184 #endif | 1184 #endif |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 void RenderProcessHostImpl::RegisterMojoInterfaces() { | 1187 void RenderProcessHostImpl::RegisterMojoInterfaces() { |
| 1188 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( | 1188 auto registry = base::MakeUnique<service_manager::InterfaceRegistry>( |
| 1189 service_manager::mojom::kServiceManager_ConnectorSpec); | 1189 service_manager::mojom::kServiceManager_ConnectorSpec); |
| 1190 | 1190 |
| (...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3003 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3003 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3004 | 3004 |
| 3005 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3005 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
| 3006 // Capture the error message in a crash key value. | 3006 // Capture the error message in a crash key value. |
| 3007 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3007 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
| 3008 bad_message::ReceivedBadMessage(render_process_id, | 3008 bad_message::ReceivedBadMessage(render_process_id, |
| 3009 bad_message::RPH_MOJO_PROCESS_ERROR); | 3009 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3010 } | 3010 } |
| 3011 | 3011 |
| 3012 } // namespace content | 3012 } // namespace content |
| OLD | NEW |