Index: chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java b/chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java |
index 172ff8618271a19fed3ae92682fa95f821f7affb..5732a1245a69969e89ca737eab932a3dcb1dc256 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java |
@@ -12,6 +12,7 @@ import org.chromium.chrome.browser.shapedetection.BarcodeDetectionImpl; |
import org.chromium.chrome.browser.shapedetection.TextDetectionImpl; |
import org.chromium.chrome.browser.webshare.ShareServiceImplementationFactory; |
import org.chromium.content_public.browser.InterfaceRegistrar; |
+import org.chromium.content_public.browser.RenderFrameHost; |
import org.chromium.content_public.browser.WebContents; |
import org.chromium.payments.mojom.PaymentRequest; |
import org.chromium.services.service_manager.InterfaceRegistry; |
@@ -28,6 +29,8 @@ class ChromeInterfaceRegistrar { |
InterfaceRegistrar.Registry.addContextRegistrar(new ChromeContextInterfaceRegistrar()); |
InterfaceRegistrar.Registry.addWebContentsRegistrar( |
new ChromeWebContentsInterfaceRegistrar()); |
+ InterfaceRegistrar.Registry.addRenderFrameHostRegistrar( |
+ new ChromeRenderFrameHostInterfaceRegistrar()); |
} |
private static class ChromeContextInterfaceRegistrar implements InterfaceRegistrar<Context> { |
@@ -45,9 +48,18 @@ class ChromeInterfaceRegistrar { |
implements InterfaceRegistrar<WebContents> { |
@Override |
public void registerInterfaces(InterfaceRegistry registry, final WebContents webContents) { |
- registry.addInterface(PaymentRequest.MANAGER, new PaymentRequestFactory(webContents)); |
registry.addInterface( |
ShareService.MANAGER, new ShareServiceImplementationFactory(webContents)); |
} |
} |
+ |
+ private static class ChromeRenderFrameHostInterfaceRegistrar |
+ implements InterfaceRegistrar<RenderFrameHost> { |
+ @Override |
+ public void registerInterfaces( |
+ InterfaceRegistry registry, final RenderFrameHost renderFrameHost) { |
+ registry.addInterface( |
+ PaymentRequest.MANAGER, new PaymentRequestFactory(renderFrameHost)); |
+ } |
+ } |
} |