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

Unified Diff: base/message_loop.h

Issue 10689161: Adds MessageLoopUIApplication for use on iOS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
Index: base/message_loop.h
diff --git a/base/message_loop.h b/base/message_loop.h
index 227bfe3d8a1cb3b06d55bb05f13fed12825659c1..ba9f43971928d663a2da1a94e8eea78427bc8036 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -549,6 +549,13 @@ class BASE_EXPORT MessageLoopForUI : public MessageLoop {
void DidProcessMessage(const MSG& message);
#endif // defined(OS_WIN)
+#if defined(OS_IOS)
+ // On iOS, the main message loop cannot be Run(). Instead call Attach(),
+ // which connects this MessageLoop to the UI thread's CFRunLoop and allows
+ // PostTask() to work.
+ void Attach();
+#endif
+
#if defined(OS_ANDROID)
// On Android, the UI message loop is handled by Java side. So Run() should
// never be called. Instead use Start(), which will forward all the native UI

Powered by Google App Engine
This is Rietveld 408576698