| 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" |
| 199 #include "ipc/ipc_sync_channel.h" | 200 #include "ipc/ipc_sync_channel.h" |
| 200 #include "media/audio/android/audio_manager_android.h" | 201 #include "media/audio/android/audio_manager_android.h" |
| 201 #endif | 202 #endif |
| 202 | 203 |
| 203 #if defined(OS_WIN) | 204 #if defined(OS_WIN) |
| 204 #include "base/win/scoped_com_initializer.h" | 205 #include "base/win/scoped_com_initializer.h" |
| 205 #include "base/win/windows_version.h" | 206 #include "base/win/windows_version.h" |
| 206 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" | 207 #include "content/browser/renderer_host/dwrite_font_proxy_message_filter_win.h" |
| 207 #include "content/common/font_cache_dispatcher_win.h" | 208 #include "content/common/font_cache_dispatcher_win.h" |
| 208 #include "content/common/sandbox_win.h" | 209 #include "content/common/sandbox_win.h" |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1222 interface_registry_android_ = | 1223 interface_registry_android_ = |
| 1223 InterfaceRegistryAndroid::Create(registry.get()); | 1224 InterfaceRegistryAndroid::Create(registry.get()); |
| 1224 InterfaceRegistrarAndroid::ExposeInterfacesToRenderer( | 1225 InterfaceRegistrarAndroid::ExposeInterfacesToRenderer( |
| 1225 interface_registry_android_.get()); | 1226 interface_registry_android_.get()); |
| 1226 #endif | 1227 #endif |
| 1227 | 1228 |
| 1228 channel_->AddAssociatedInterface( | 1229 channel_->AddAssociatedInterface( |
| 1229 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, | 1230 base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest, |
| 1230 base::Unretained(this))); | 1231 base::Unretained(this))); |
| 1231 | 1232 |
| 1232 #if !defined(OS_ANDROID) | 1233 #if defined(OS_ANDROID) |
| 1234 AddUIThreadInterface(registry.get(), |
| 1235 GetGlobalJavaInterfaces() |
| 1236 ->CreateInterfaceFactory<device::BatteryMonitor>()); |
| 1237 #else |
| 1233 AddUIThreadInterface( | 1238 AddUIThreadInterface( |
| 1234 registry.get(), base::Bind(&device::BatteryMonitorImpl::Create)); | 1239 registry.get(), base::Bind(&device::BatteryMonitorImpl::Create)); |
| 1235 #endif | 1240 #endif |
| 1236 AddUIThreadInterface( | 1241 AddUIThreadInterface( |
| 1237 registry.get(), | 1242 registry.get(), |
| 1238 base::Bind(&PermissionServiceContext::CreateService, | 1243 base::Bind(&PermissionServiceContext::CreateService, |
| 1239 base::Unretained(permission_service_context_.get()))); | 1244 base::Unretained(permission_service_context_.get()))); |
| 1240 // TODO(mcasas): finalize arguments. | 1245 // TODO(mcasas): finalize arguments. |
| 1241 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); | 1246 AddUIThreadInterface(registry.get(), base::Bind(&ImageCaptureImpl::Create)); |
| 1242 AddUIThreadInterface( | 1247 AddUIThreadInterface( |
| (...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3040 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3045 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
| 3041 | 3046 |
| 3042 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias | 3047 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. Alias |
| 3043 // enough information here so that we can determine what the bad message was. | 3048 // enough information here so that we can determine what the bad message was. |
| 3044 base::debug::Alias(&error); | 3049 base::debug::Alias(&error); |
| 3045 bad_message::ReceivedBadMessage(process.get(), | 3050 bad_message::ReceivedBadMessage(process.get(), |
| 3046 bad_message::RPH_MOJO_PROCESS_ERROR); | 3051 bad_message::RPH_MOJO_PROCESS_ERROR); |
| 3047 } | 3052 } |
| 3048 | 3053 |
| 3049 } // namespace content | 3054 } // namespace content |
| OLD | NEW |