Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(780)

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2214383002: 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: fix vr_shell build Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 86542396b12f3788cac8e74a7c60eb6dc33552e5..78e6dc9a56d69f48963fef625055fd68d337ca97 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -196,6 +196,7 @@
#include "content/browser/media/android/browser_demuxer_android.h"
#include "content/browser/mojo/interface_registrar_android.h"
#include "content/browser/screen_orientation/screen_orientation_message_filter_android.h"
+#include "content/public/browser/android/java_interfaces.h"
#include "ipc/ipc_sync_channel.h"
#include "media/audio/android/audio_manager_android.h"
#endif
@@ -1229,7 +1230,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
base::Bind(&RenderProcessHostImpl::OnRouteProviderRequest,
base::Unretained(this)));
-#if !defined(OS_ANDROID)
+#if defined(OS_ANDROID)
+ AddUIThreadInterface(registry.get(),
+ GetGlobalJavaInterfaces()
+ ->CreateInterfaceFactory<device::BatteryMonitor>());
+#else
AddUIThreadInterface(
registry.get(), base::Bind(&device::BatteryMonitorImpl::Create));
#endif
« 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