Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2374213002: Revert of Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698