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

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

Issue 1867773002: Expose the Java ServiceRegistryInterface in content_public. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-java
Patch Set: Created 4 years, 8 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/ServiceRegistry.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ServiceRegistry.java b/content/public/android/java/src/org/chromium/content/browser/ServiceRegistry.java
index b81267b148a2e7494b2d1a30a147b9123ed7c0de..a4ad3fd0270e5583f71ed14756a37675a31122bf 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ServiceRegistry.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ServiceRegistry.java
@@ -6,6 +6,7 @@ package org.chromium.content.browser;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
+import org.chromium.content_public.browser.ServiceRegistryInterface;
import org.chromium.mojo.bindings.Interface;
import org.chromium.mojo.bindings.Interface.Proxy;
import org.chromium.mojo.bindings.InterfaceRequest;
@@ -17,21 +18,8 @@ import org.chromium.mojo.system.impl.CoreImpl;
* Java wrapper over Mojo ServiceRegistry held by the browser.
*/
@JNINamespace("content")
-public class ServiceRegistry {
-
- /**
- * The interface that a factory should implement.
- */
- public interface ImplementationFactory<I extends Interface> {
- I createImpl();
- }
-
- /**
- * Adds a service factory.
- *
- * @param manager The interface manager.
- * @param factory The service factory.
- */
+public class ServiceRegistry implements ServiceRegistryInterface {
+ @Override
public <I extends Interface, P extends Proxy> void addService(
Interface.Manager<I, P> manager, ImplementationFactory<I> factory) {
nativeAddService(mNativeServiceRegistryAndroid, manager, factory, manager.getName());

Powered by Google App Engine
This is Rietveld 408576698