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

Unified Diff: base/message_loop/message_loop.cc

Issue 1582123002: Augment message_loop with ability for custom UI message pumps (issue 576536) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add name to Authors file Created 4 years, 11 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') | no next file » | 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 e84765a0f7a7e022764ce0db1509f572745c51a0..88f75e91e5b6863ae260a3530a0bd803da095809 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -398,7 +398,7 @@ MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
new internal::MessageLoopTaskRunner(incoming_task_queue_)),
task_runner_(unbound_task_runner_) {
// If type is TYPE_CUSTOM non-null pump_factory must be given.
- DCHECK_EQ(type_ == TYPE_CUSTOM, !pump_factory_.is_null());
+ DCHECK(type_ != TYPE_CUSTOM || !pump_factory_.is_null());
}
void MessageLoop::BindToCurrentThread() {
@@ -684,6 +684,10 @@ void MessageLoop::ReleaseSoonInternal(
//------------------------------------------------------------------------------
// MessageLoopForUI
+MessageLoopForUI::MessageLoopForUI(scoped_ptr<MessagePump> pump)
+ : MessageLoop(TYPE_UI, Bind(&ReturnPump, Passed(&pump))) {
+}
+
#if defined(OS_ANDROID)
void MessageLoopForUI::Start() {
// No Histogram support for UI message loop as it is managed by Java side
« no previous file with comments | « base/message_loop/message_loop.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698