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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrar.java

Issue 2191033002: Split ServiceRegistryAndroid into InterfaceRegistryAndroid and InterfaceProviderAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/InterfaceRegistrar.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ServiceRegistrar.java b/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrar.java
similarity index 82%
rename from content/public/android/java/src/org/chromium/content/browser/ServiceRegistrar.java
rename to content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrar.java
index a9d7f8f9d8cd64e7457dd7b6371028a611217c61..1840a2dd4df075e1a9c72f243ddb8ce7795c9e5a 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ServiceRegistrar.java
+++ b/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrar.java
@@ -8,17 +8,17 @@ import android.content.Context;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
-import org.chromium.content.browser.ServiceRegistry.ImplementationFactory;
+import org.chromium.content.browser.InterfaceRegistry.ImplementationFactory;
import org.chromium.device.battery.BatteryMonitorFactory;
import org.chromium.device.vibration.VibrationManagerImpl;
import org.chromium.mojom.device.BatteryMonitor;
import org.chromium.mojom.device.VibrationManager;
/**
- * Registers mojo services exposed by the browser in the given registry.
+ * Registers interfaces exposed by the browser in the given registry.
*/
@JNINamespace("content")
-class ServiceRegistrar {
+class InterfaceRegistrar {
// BatteryMonitorFactory can't implement ImplementationFactory itself, as we don't depend on
// /content in /device. Hence we use BatteryMonitorImplementationFactory as a wrapper.
private static class BatteryMonitorImplementationFactory
@@ -50,16 +50,16 @@ class ServiceRegistrar {
}
@CalledByNative
- static void registerProcessHostServices(ServiceRegistry registry, Context applicationContext) {
+ static void exposeInterfacesToRenderer(InterfaceRegistry registry, Context applicationContext) {
assert applicationContext != null;
- registry.addService(BatteryMonitor.MANAGER,
+ registry.addInterface(BatteryMonitor.MANAGER,
new BatteryMonitorImplementationFactory(applicationContext));
}
@CalledByNative
- static void registerFrameHostServices(ServiceRegistry registry, Context applicationContext) {
+ static void exposeInterfacesToFrame(InterfaceRegistry registry, Context applicationContext) {
assert applicationContext != null;
- registry.addService(VibrationManager.MANAGER,
+ registry.addInterface(VibrationManager.MANAGER,
new VibrationManagerImplementationFactory(applicationContext));
// TODO(avayvod): Register the PresentationService implementation here.
}

Powered by Google App Engine
This is Rietveld 408576698