| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 #include "ui/gfx/switches.h" | 189 #include "ui/gfx/switches.h" |
| 190 #include "ui/gl/gl_switches.h" | 190 #include "ui/gl/gl_switches.h" |
| 191 #include "ui/gl/gpu_switching_manager.h" | 191 #include "ui/gl/gpu_switching_manager.h" |
| 192 #include "ui/native_theme/native_theme_switches.h" | 192 #include "ui/native_theme/native_theme_switches.h" |
| 193 | 193 |
| 194 #if defined(OS_ANDROID) | 194 #if defined(OS_ANDROID) |
| 195 #include "content/browser/android/child_process_launcher_android.h" | 195 #include "content/browser/android/child_process_launcher_android.h" |
| 196 #include "content/browser/media/android/browser_demuxer_android.h" | 196 #include "content/browser/media/android/browser_demuxer_android.h" |
| 197 #include "content/browser/mojo/interface_registrar_android.h" | 197 #include "content/browser/mojo/interface_registrar_android.h" |
| 198 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" | 198 #include "content/browser/screen_orientation/screen_orientation_message_filter_a
ndroid.h" |
| 199 #include "content/public/browser/android/java_interfaces.h" | |
| 200 #include "ipc/ipc_sync_channel.h" | 199 #include "ipc/ipc_sync_channel.h" |
| 201 #include "media/audio/android/audio_manager_android.h" | 200 #include "media/audio/android/audio_manager_android.h" |
| 202 #endif | 201 #endif |
| 203 | 202 |
| 204 #if defined(OS_WIN) | 203 #if defined(OS_WIN) |
| 205 #include "base/win/scoped_com_initializer.h" | 204 #include "base/win/scoped_com_initializer.h" |
| 206 #include "base/win/windows_version.h" | 205 #include "base/win/windows_version.h" |
| 207 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" | 206 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
| 208 #include "content/common/font_cache_dispatcher_win.h" | 207 #include "content/common/font_cache_dispatcher_win.h" |
| 209 #include "content/common/sandbox_win.h" | 208 #include "content/common/sandbox_win.h" |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1196 interface_registry_android_ = | 1195 interface_registry_android_ = |
| 1197 InterfaceRegistryAndroid::Create(registry.get()); | 1196 InterfaceRegistryAndroid::Create(registry.get()); |
| 1198 InterfaceRegistrarAndroid::ExposeInterfacesToRenderer( | 1197 InterfaceRegistrarAndroid::ExposeInterfacesToRenderer( |
| 1199 interface_registry_android_.get()); | 1198 interface_registry_android_.get()); |
| 1200 #endif | 1199 #endif |
| 1201 | 1200 |
| 1202 channel_->AddAssociatedInterface( | 1201 channel_->AddAssociatedInterface( |
| 1203 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, | 1202 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, |
| 1204 base::Unretained(this))); | 1203 base::Unretained(this))); |
| 1205 | 1204 |
| 1206 #if defined(OS_ANDROID) | 1205 #if !defined(OS_ANDROID) |
| 1207 AddUIThreadInterface(registry.get(), | |
| 1208 GetGlobalJavaInterfaces() | |
| 1209 ->CreateInterfaceFactory<device::BatteryMonitor>()); | |
| 1210 #else | |
| 1211 AddUIThreadInterface( | 1206 AddUIThreadInterface( |
| 1212 registry.get(), base::Bind(&device::BatteryMonitorImpl::Create)); | 1207 registry.get(), base::Bind(&device::BatteryMonitorImpl::Create)); |
| 1213 #endif | 1208 #endif |
| 1214 AddUIThreadInterface( | 1209 AddUIThreadInterface( |
| 1215 registry.get(), | 1210 registry.get(), |
| 1216 base::Bind(&PermissionServiceContext::CreateService, | 1211 base::Bind(&PermissionServiceContext::CreateService, |
| 1217 base::Unretained(permission_service_context_.get()))); | 1212 base::Unretained(permission_service_context_.get()))); |
| 1218 // TODO(mcasas): finalize arguments. | 1213 // TODO(mcasas): finalize arguments. |
| 1219 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); | 1214 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); |
| 1220 AddUIThreadInterface( | 1215 AddUIThreadInterface( |
| (...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2999 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 2994 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3000 | 2995 |
| 3001 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 2996 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 3002 // enough information here so that we can determine what the bad message was. | 2997 // enough information here so that we can determine what the bad message was. |
| 3003 base::debug::Alias(&error); | 2998 base::debug::Alias(&error); |
| 3004 bad_message::ReceivedBadMessage(process.get(), | 2999 bad_message::ReceivedBadMessage(process.get(), |
| 3005 bad_message::RPH_MOJO_PROCESS_ERROR); | 3000 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3006 } | 3001 } |
| 3007 | 3002 |
| 3008 } // namespace content | 3003 } // namespace content |
| OLD | NEW |