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

Unified Diff: services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java

Issue 2897313002: Android: Simplify isTablet and InterfaceRegistrars (Closed)
Patch Set: Pull out local variable Created 3 years, 7 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: services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java b/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
index 5bb934cb8d0b4b885be10539d7ae0268ac0f26ec..c52e2279450dd1676fec4743820629fc9cf5e7bf 100644
--- a/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
+++ b/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java
@@ -4,7 +4,6 @@
package org.chromium.shape_detection;
-import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.mojo.system.impl.CoreImpl;
@@ -19,14 +18,11 @@ class InterfaceRegistrar {
static void createInterfaceRegistryForContext(int nativeHandle) {
// Note: The bindings code manages the lifetime of this object, so it
// is not necessary to hold on to a reference to it explicitly.
- // TODO(wnwen): Move references to getApplicationContext lower.
InterfaceRegistry registry = InterfaceRegistry.create(
CoreImpl.getInstance().acquireNativeHandle(nativeHandle).toMessagePipeHandle());
- registry.addInterface(BarcodeDetection.MANAGER,
- new BarcodeDetectionImpl.Factory(ContextUtils.getApplicationContext()));
- registry.addInterface(FaceDetectionProvider.MANAGER,
- new FaceDetectionProviderImpl.Factory(ContextUtils.getApplicationContext()));
- registry.addInterface(TextDetection.MANAGER,
- new TextDetectionImpl.Factory(ContextUtils.getApplicationContext()));
+ registry.addInterface(BarcodeDetection.MANAGER, new BarcodeDetectionImpl.Factory());
+ registry.addInterface(
+ FaceDetectionProvider.MANAGER, new FaceDetectionProviderImpl.Factory());
+ registry.addInterface(TextDetection.MANAGER, new TextDetectionImpl.Factory());
}
}

Powered by Google App Engine
This is Rietveld 408576698