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

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

Issue 2629523008: Shape Detection: Remove ConstructorCallWith=Document (Closed)
Patch Set: Add layout test for worker Created 3 years, 11 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/shapedetection/BarcodeDetectionFactory.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 81dd3d1f892a7bdf7bcfd659ce50e0626f1ba755..799b847f8312bd5a4970ecef0d23cc515f5aa1d5 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
@@ -4,6 +4,8 @@
package org.chromium.chrome.browser.mojo;
+import android.content.Context;
+
import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.payments.PaymentRequestFactory;
import org.chromium.chrome.browser.shapedetection.BarcodeDetectionFactory;
@@ -21,19 +23,26 @@ import org.chromium.webshare.mojom.ShareService;
class ChromeInterfaceRegistrar {
@CalledByNative
private static void registerMojoInterfaces() {
+ InterfaceRegistrar.Registry.addContextRegistrar(new ChromeContextInterfaceRegistrar());
InterfaceRegistrar.Registry.addWebContentsRegistrar(
new ChromeWebContentsInterfaceRegistrar());
}
}
+class ChromeContextInterfaceRegistrar implements InterfaceRegistrar<Context> {
+ @Override
+ public void registerInterfaces(InterfaceRegistry registry, final Context applicationContext) {
+ registry.addInterface(
+ BarcodeDetection.MANAGER, new BarcodeDetectionFactory(applicationContext));
+ registry.addInterface(TextDetection.MANAGER, new TextDetectionFactory(applicationContext));
+ }
+}
+
class ChromeWebContentsInterfaceRegistrar 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));
- registry.addInterface(
- BarcodeDetection.MANAGER, new BarcodeDetectionFactory(webContents));
- registry.addInterface(TextDetection.MANAGER, new TextDetectionFactory(webContents));
}
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/shapedetection/BarcodeDetectionFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698