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

Unified Diff: ash/display/display_animator_chromeos.cc

Issue 1640503002: ash: Do not use MessageLoopForUI when not needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: ash/display/display_animator_chromeos.cc
diff --git a/ash/display/display_animator_chromeos.cc b/ash/display/display_animator_chromeos.cc
index 572c013b5365039f3724ab7ca5b06b486f65aac9..0d9636ca7a04a8009c32baf6778457a7f447a3c4 100644
--- a/ash/display/display_animator_chromeos.cc
+++ b/ash/display/display_animator_chromeos.cc
@@ -8,6 +8,7 @@
#include "ash/shell_window_ids.h"
#include "base/bind.h"
#include "base/stl_util.h"
+#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "ui/aura/window.h"
#include "ui/aura/window_event_dispatcher.h"
@@ -40,9 +41,9 @@ class CallbackRunningObserver {
void OnSingleTaskCompleted() {
completed_counter_++;
if (completed_counter_ >= observer_list_.size()) {
- base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, this);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
if (!animation_aborted_)
- base::MessageLoopForUI::current()->PostTask(FROM_HERE, callback_);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback_);
}
}

Powered by Google App Engine
This is Rietveld 408576698