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

Unified Diff: mojo/bindings/java/src/org/chromium/mojo/bindings/Connector.java

Issue 364063006: JAVA BINDINGS WIP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/bindings/java/src/org/chromium/mojo/bindings/Connector.java
diff --git a/mojo/bindings/java/src/org/chromium/mojo/bindings/Connector.java b/mojo/bindings/java/src/org/chromium/mojo/bindings/Connector.java
index 9c74fbd776d48aaf1e0ee9a6505bc101cafcf142..d18e2ce697e7f4c9eb189396bec8363069c6653a 100644
--- a/mojo/bindings/java/src/org/chromium/mojo/bindings/Connector.java
+++ b/mojo/bindings/java/src/org/chromium/mojo/bindings/Connector.java
@@ -21,13 +21,6 @@ import org.chromium.mojo.system.MojoResult;
public class Connector implements MessageReceiver, HandleOwner<MessagePipeHandle> {
/**
- * An {@link ErrorHandler} is notified of error happening while using the message pipe.
- */
- interface ErrorHandler {
- public void onError(MojoException e);
- }
-
- /**
* The callback that is notified when the state of the owned handle changes.
*/
private final AsyncWaiterCallback mAsyncWaiterCallback = new AsyncWaiterCallback();
@@ -55,7 +48,7 @@ public class Connector implements MessageReceiver, HandleOwner<MessagePipeHandle
/**
* The error handler to notify of errors.
*/
- private ErrorHandler mErrorHandler;
+ private ConnectionErrorHandler mErrorHandler;
/**
* Create a new connector over a |messagePipeHandle|. The created connector will use the default
@@ -83,9 +76,9 @@ public class Connector implements MessageReceiver, HandleOwner<MessagePipeHandle
}
/**
- * Set the {@link ErrorHandler} that will be notified of errors on the owned message pipe.
+ * Set the {@link ConnectionErrorHandler} that will be notified of errors on the owned message pipe.
*/
- public void setErrorHandler(ErrorHandler errorHandler) {
+ public void setErrorHandler(ConnectionErrorHandler errorHandler) {
mErrorHandler = errorHandler;
}
@@ -178,7 +171,7 @@ public class Connector implements MessageReceiver, HandleOwner<MessagePipeHandle
mCancellable = null;
close();
if (mErrorHandler != null) {
- mErrorHandler.onError(exception);
+ mErrorHandler.onConnectionError(exception);
}
}

Powered by Google App Engine
This is Rietveld 408576698