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

Unified Diff: mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java

Issue 1169543002: Fix the API for ServiceFactoryBinder to be type safe. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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: mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java
diff --git a/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java b/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java
index 462d74ea678f6d0bf03613bc29a6bca70ba0e87a..0171a38726900ac233b83f612210c6fca108d1b2 100644
--- a/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java
+++ b/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java
@@ -5,7 +5,7 @@
package org.chromium.mojo.application;
import org.chromium.mojo.bindings.Interface;
-import org.chromium.mojo.system.MessagePipeHandle;
+import org.chromium.mojo.bindings.InterfaceRequest;
/**
* ServiceFactoryBinder holds the necessary information to bind a service interface to a message
@@ -15,16 +15,14 @@ import org.chromium.mojo.system.MessagePipeHandle;
*/
public interface ServiceFactoryBinder<T extends Interface> {
/**
- * An application implements to bind a service implementation to |pipe|.
+ * Binds an instance of the interface to the given request.
*
- * @param pipe A handle to the incoming connection pipe.
+ * @param request The request to bind to.
*/
- public void bindNewInstanceToMessagePipe(MessagePipeHandle pipe);
+ public void bind(InterfaceRequest<T> request);
/**
- * Name of the service interface being implemented.
- *
- * @return Service interface name.
+ * Returns the name of the service interface being implemented.
*/
public String getInterfaceName();
}

Powered by Google App Engine
This is Rietveld 408576698