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

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

Issue 2374213002: Revert of Move registration of Java mojo interfaces to the new InterfaceRegistrar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java-content-interface-registry
Patch Set: Created 4 years, 3 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: 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 2d7b327fea11a22050a3c87930699f2f9f667fb4..bc1f845dceb3d944c203272224e2c3c59f13e43f 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
@@ -7,24 +7,18 @@
import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.payments.PaymentRequestFactory;
import org.chromium.chrome.browser.webshare.ShareServiceImplementationFactory;
-import org.chromium.content_public.browser.InterfaceRegistrar;
+import org.chromium.content.browser.InterfaceRegistry;
import org.chromium.content_public.browser.WebContents;
import org.chromium.payments.mojom.PaymentRequest;
-import org.chromium.services.shell.InterfaceRegistry;
import org.chromium.webshare.mojom.ShareService;
-/** Registers mojo interface implementations exposed to C++ code at the Chrome layer. */
+/**
+ * Registers interfaces exposed by Chrome in the given registry.
+ */
class ChromeInterfaceRegistrar {
@CalledByNative
- private static void registerMojoInterfaces() {
- InterfaceRegistrar.Registry.addWebContentsRegistrar(
- new ChromeWebContentsInterfaceRegistrar());
- }
-}
-
-class ChromeWebContentsInterfaceRegistrar implements InterfaceRegistrar<WebContents> {
- @Override
- public void registerInterfaces(InterfaceRegistry registry, final WebContents webContents) {
+ private static void exposeInterfacesToFrame(
+ InterfaceRegistry registry, WebContents webContents) {
registry.addInterface(PaymentRequest.MANAGER, new PaymentRequestFactory(webContents));
registry.addInterface(
ShareService.MANAGER, new ShareServiceImplementationFactory(webContents));
« no previous file with comments | « chrome/android/java/DEPS ('k') | 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