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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java

Issue 2692023002: Make PaymentRequestImpl work with RenderFrameHost (Closed)
Patch Set: Address review comment 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+ }
+ }
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698