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

Unified Diff: examples/java_android/example_service/src/org/chromium/examples/android/ExampleServiceApp.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: examples/java_android/example_service/src/org/chromium/examples/android/ExampleServiceApp.java
diff --git a/examples/java_android/example_service/src/org/chromium/examples/android/ExampleServiceApp.java b/examples/java_android/example_service/src/org/chromium/examples/android/ExampleServiceApp.java
index d476d8d1888193d92736036c99356d7ad8cbacc3..7e18b57f2edb5456c91e48234075508ea4b5991a 100644
--- a/examples/java_android/example_service/src/org/chromium/examples/android/ExampleServiceApp.java
+++ b/examples/java_android/example_service/src/org/chromium/examples/android/ExampleServiceApp.java
@@ -11,6 +11,7 @@ import org.chromium.mojo.application.ApplicationConnection;
import org.chromium.mojo.application.ApplicationDelegate;
import org.chromium.mojo.application.ApplicationRunner;
import org.chromium.mojo.application.ServiceFactoryBinder;
+import org.chromium.mojo.bindings.InterfaceRequest;
import org.chromium.mojo.system.Core;
import org.chromium.mojo.system.MessagePipeHandle;
import org.chromium.mojo.system.MojoException;
@@ -45,8 +46,8 @@ class ExampleServiceApp implements ApplicationDelegate {
Log.i(TAG, "ExampleServiceApp.ConfigureIncomingConnection() called.");
connection.addService(new ServiceFactoryBinder<ExampleService>() {
@Override
- public void bindNewInstanceToMessagePipe(MessagePipeHandle pipe) {
- ExampleService.MANAGER.bind(new ExampleServiceImpl(), pipe);
+ public void bind(InterfaceRequest<ExampleService> request) {
+ ExampleService.MANAGER.bind(new ExampleServiceImpl(), request);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698