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

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

Issue 898853006: Java content handler for Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « mojo/public/java/system/src/org/chromium/mojo/system/Core.java ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/java/system/src/org/chromium/mojo/system/RunLoop.java
diff --git a/mojo/public/java/system/src/org/chromium/mojo/system/RunLoop.java b/mojo/public/java/system/src/org/chromium/mojo/system/RunLoop.java
new file mode 100644
index 0000000000000000000000000000000000000000..4038b2954e50ae3f0f527bb75868e508cf88fa54
--- /dev/null
+++ b/mojo/public/java/system/src/org/chromium/mojo/system/RunLoop.java
@@ -0,0 +1,41 @@
+// 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 java.io.Closeable;
+
+/**
+ * Definition of a run loop.
+ */
+public interface RunLoop extends Closeable {
+ /**
+ * Start the run loop. It will continue until quit() is called.
+ */
+ public void run();
+
+ /**
+ * Start the run loop and stop it as soon as no task is present in the work queue.
+ */
+ public void runUntilIdle();
+
+ /*
+ * Quit the currently running run loop.
+ */
+ public void quit();
+
+ /**
+ * Add a runnable to the queue of tasks.
+ * @param runnable Callback to be executed by the run loop.
+ * @param delay Delay, in MojoTimeTicks (microseconds) before the callback should
+ * be executed.
+ */
+ public void postDelayedTask(Runnable runnable, long delay);
+
+ /**
+ * Destroy the run loop and deregister it from Core.
+ */
+ @Override
+ public abstract void close();
+}
« no previous file with comments | « mojo/public/java/system/src/org/chromium/mojo/system/Core.java ('k') | mojo/tools/data/apptests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698