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

Unified Diff: content/browser/frame_host/render_frame_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
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 6bd1d310395dc97fced96fd2ea22e6cd1dc9850e..1cf8c1fed9f951f3f47395f3c9a9b8e1acf22941 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -98,6 +98,7 @@
#if defined(OS_ANDROID)
#include "content/browser/mojo/interface_registrar_android.h"
+#include "content/public/browser/android/java_interfaces.h"
#if defined(ENABLE_MOJO_CDM)
#include "content/browser/media/android/provision_fetcher_impl.h"
#endif
@@ -2144,7 +2145,11 @@ void RenderFrameHostImpl::RegisterMojoInterfaces() {
GetInterfaceRegistry()->AddInterface(base::Bind(
&PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
-#if !defined(OS_ANDROID)
+#if defined(OS_ANDROID)
+ GetInterfaceRegistry()->AddInterface(
+ GetGlobalJavaInterfaces()
+ ->CreateInterfaceFactory<device::VibrationManager>());
+#else
GetInterfaceRegistry()->AddInterface(
base::Bind(&device::VibrationManagerImpl::Create));
#endif
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698