Index: third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java |
diff --git a/third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java b/third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..462d74ea678f6d0bf03613bc29a6bca70ba0e87a |
--- /dev/null |
+++ b/third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java |
@@ -0,0 +1,30 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.mojo.application; |
+ |
+import org.chromium.mojo.bindings.Interface; |
+import org.chromium.mojo.system.MessagePipeHandle; |
+ |
+/** |
+ * ServiceFactoryBinder holds the necessary information to bind a service interface to a message |
+ * pipe. |
+ * |
+ * @param <T> A mojo service interface. |
+ */ |
+public interface ServiceFactoryBinder<T extends Interface> { |
+ /** |
+ * An application implements to bind a service implementation to |pipe|. |
+ * |
+ * @param pipe A handle to the incoming connection pipe. |
+ */ |
+ public void bindNewInstanceToMessagePipe(MessagePipeHandle pipe); |
+ |
+ /** |
+ * Name of the service interface being implemented. |
+ * |
+ * @return Service interface name. |
+ */ |
+ public String getInterfaceName(); |
+} |