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

Unified Diff: mojo/public/java/system/src/org/chromium/mojo/system/AsyncWaiter.java

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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/system/src/org/chromium/mojo/system/AsyncWaiter.java
diff --git a/mojo/public/java/system/src/org/chromium/mojo/system/AsyncWaiter.java b/mojo/public/java/system/src/org/chromium/mojo/system/AsyncWaiter.java
deleted file mode 100644
index 474de4bd2c556e96b1c36c60546111ae71292987..0000000000000000000000000000000000000000
--- a/mojo/public/java/system/src/org/chromium/mojo/system/AsyncWaiter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2014 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.system;
-
-import org.chromium.mojo.system.Core.HandleSignals;
-
-/**
- * A class which implements the {@link AsyncWaiter} allows asynchronously waiting on a background
- * thread.
- */
-public interface AsyncWaiter {
-
- /**
- * Allows cancellation of an asyncWait operation.
- */
- interface Cancellable {
- /**
- * Cancels an asyncWait operation. Has no effect if the operation has already been canceled
- * or the callback has already been called.
- * <p>
- * Must be called from the same thread as {@link AsyncWaiter#asyncWait} was called from.
- */
- void cancel();
- }
-
- /**
- * Callback passed to {@link AsyncWaiter#asyncWait}.
- */
- public interface Callback {
- /**
- * Called when the handle is ready.
- */
- public void onResult(int result);
-
- /**
- * Called when an error occurred while waiting.
- */
- public void onError(MojoException exception);
- }
-
- /**
- * Asynchronously call wait on a background thread. The given {@link Callback} will be notified
- * of the result of the wait on the same thread as asyncWait was called.
- *
- * @return a {@link Cancellable} object that can be used to cancel waiting. The cancellable
- * should only be used on the current thread, and becomes invalid once the callback has
- * been notified.
- */
- Cancellable asyncWait(Handle handle, HandleSignals signals, long deadline, Callback callback);
-
-}

Powered by Google App Engine
This is Rietveld 408576698