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

Unified Diff: base/message_loop/message_loop.cc

Issue 18584006: Making a way to create thread with a Java Looper for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and cr fix Created 7 years, 5 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 | « base/message_loop/message_loop.h ('k') | base/threading/thread_restrictions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.cc
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index d2eafbd8489fd32c0822ebe9b740c2f560f1c3a2..826c7573ee60e942fd0fb1beac5dff327d7a907c 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -92,7 +92,7 @@ MessageLoop::MessagePumpFactory* message_pump_for_ui_factory_ = NULL;
// time for every task that is added to the MessageLoop incoming queue.
bool AlwaysNotifyPump(MessageLoop::Type type) {
#if defined(OS_ANDROID)
- return type == MessageLoop::TYPE_UI;
+ return type == MessageLoop::TYPE_UI || type == MessageLoop::TYPE_JAVA;
#else
return false;
#endif
@@ -184,6 +184,10 @@ MessageLoop::MessageLoop(Type type)
pump_.reset(MESSAGE_PUMP_UI);
} else if (type_ == TYPE_IO) {
pump_.reset(MESSAGE_PUMP_IO);
+#if defined(OS_ANDROID)
brettw 2013/08/06 21:43:47 Can you add a comment here that the requirements a
+ } else if (type_ == TYPE_JAVA) {
+ pump_.reset(MESSAGE_PUMP_UI);
+#endif
} else {
DCHECK_EQ(TYPE_DEFAULT, type_);
pump_.reset(new MessagePumpDefault());
« no previous file with comments | « base/message_loop/message_loop.h ('k') | base/threading/thread_restrictions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698