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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.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
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 ec7a1258fa1e827ed995a14005f4793383d660ce..081410e71e57a746271634e73e93ae792f45b56b 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
@@ -10,6 +10,7 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.content.browser.shapedetection.FaceDetectionProviderImpl;
import org.chromium.content_public.browser.InterfaceRegistrar;
+import org.chromium.content_public.browser.RenderFrameHost;
import org.chromium.content_public.browser.WebContents;
import org.chromium.device.BatteryMonitor;
import org.chromium.device.battery.BatteryMonitorFactory;
@@ -43,6 +44,16 @@ class InterfaceRegistrarImpl {
InterfaceRegistrar.Registry.applyWebContentsRegistrars(registry, webContents);
}
+ @CalledByNative
+ static void createInterfaceRegistryForRenderFrameHost(
+ int nativeHandle, RenderFrameHost renderFrameHost) {
+ ensureContentRegistrarsAreRegistered();
+
+ InterfaceRegistry registry = InterfaceRegistry.create(
+ CoreImpl.getInstance().acquireNativeHandle(nativeHandle).toMessagePipeHandle());
+ InterfaceRegistrar.Registry.applyRenderFrameHostRegistrars(registry, renderFrameHost);
+ }
+
private static void ensureContentRegistrarsAreRegistered() {
if (sHasRegisteredRegistrars) return;
sHasRegisteredRegistrars = true;

Powered by Google App Engine
This is Rietveld 408576698