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 |
dcheng
2017/03/21 07:37:50
Nit: though this CL didn't introduce it, it would
Matt Giuca
2017/03/21 07:46:01
The 3 different types are just for clients that re
dcheng
2017/03/22 01:23:26
Sure, followup CL is fine. It's just hard for a no
|
+ implements InterfaceRegistrar<RenderFrameHost> { |
+ @Override |
+ public void registerInterfaces( |
+ InterfaceRegistry registry, final RenderFrameHost renderFrameHost) { |
+ registry.addInterface( |
+ InstalledAppProvider.MANAGER, new InstalledAppProviderFactory(renderFrameHost)); |
+ } |
+ } |
} |