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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java

Issue 2706403014: Add Android implementation of navigator.getInstalledRelatedApps. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java b/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
index c1f76a14394e1b795a72069b6b7b822fcfcfd6e7..680e9d472fc272f3795a13c4bd3c9b48f29ff4b7 100644
--- a/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
+++ b/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java
@@ -9,6 +9,7 @@ import android.content.Context;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.content.browser.androidoverlay.AndroidOverlayProviderImpl;
+import org.chromium.content.browser.installedapp.InstalledAppProviderFactory;
import org.chromium.content.browser.shapedetection.FaceDetectionProviderImpl;
import org.chromium.content_public.browser.InterfaceRegistrar;
import org.chromium.content_public.browser.RenderFrameHost;
@@ -18,6 +19,7 @@ import org.chromium.device.battery.BatteryMonitorFactory;
import org.chromium.device.mojom.VibrationManager;
import org.chromium.device.nfc.mojom.Nfc;
import org.chromium.device.vibration.VibrationManagerImpl;
+import org.chromium.installedapp.mojom.InstalledAppProvider;
import org.chromium.media.mojom.AndroidOverlayProvider;
import org.chromium.mojo.system.impl.CoreImpl;
import org.chromium.services.service_manager.InterfaceRegistry;
@@ -62,6 +64,8 @@ class InterfaceRegistrarImpl {
InterfaceRegistrar.Registry.addContextRegistrar(new ContentContextInterfaceRegistrar());
InterfaceRegistrar.Registry.addWebContentsRegistrar(
new ContentWebContentsInterfaceRegistrar());
+ InterfaceRegistrar.Registry.addRenderFrameHostRegistrar(
+ new ContentRenderFrameHostInterfaceRegistrar());
}
private static class ContentContextInterfaceRegistrar implements InterfaceRegistrar<Context> {
@@ -87,4 +91,14 @@ class InterfaceRegistrarImpl {
registry.addInterface(Nfc.MANAGER, new NfcFactory(webContents));
}
}
+
+ private static class ContentRenderFrameHostInterfaceRegistrar
+ implements InterfaceRegistrar<RenderFrameHost> {
+ @Override
+ public void registerInterfaces(
+ InterfaceRegistry registry, final RenderFrameHost renderFrameHost) {
+ registry.addInterface(
+ InstalledAppProvider.MANAGER, new InstalledAppProviderFactory(renderFrameHost));
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698