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

Unified Diff: base/android/java/src/org/chromium/base/ThreadUtils.java

Issue 11416347: Adding java implementation for Geolocation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated comment and copyright date Created 8 years 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: base/android/java/src/org/chromium/base/ThreadUtils.java
diff --git a/base/android/java/src/org/chromium/base/ThreadUtils.java b/base/android/java/src/org/chromium/base/ThreadUtils.java
index b827a0b6c0b49914cebdcfe8f357fec32fc2b915..70232c4ea139b2f1fba8d9145fb0d25f7e5042c5 100644
--- a/base/android/java/src/org/chromium/base/ThreadUtils.java
+++ b/base/android/java/src/org/chromium/base/ThreadUtils.java
@@ -123,6 +123,16 @@ public class ThreadUtils {
}
/**
+ * Post the supplied Runnable to run on the main thread. The method will
+ * not block, even if called on the UI thread.
+ *
+ * @param task The Runnable to run
+ */
+ public static void postOnUiThread(Runnable r) {
+ LazyHolder.sUiThreadHandler.post(r);
+ }
+
+ /**
* Asserts that the current thread is running on the main thread.
*/
public static void assertOnUiThread() {

Powered by Google App Engine
This is Rietveld 408576698