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

Unified Diff: ash/display/window_tree_host_manager.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/window_tree_host_manager.cc
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index f99f7a41b1c44ef3c24cdeefc658b9626ac3c977..7575653ba4dd5f9af6d42a6f45656077579b76d2 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -33,6 +33,7 @@
#include "base/stl_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "ui/aura/client/capture_client.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/screen_position_client.h"
@@ -642,7 +643,7 @@ void WindowTreeHostManager::DeleteHost(AshWindowTreeHost* host_to_delete) {
// Delete most of root window related objects, but don't delete
// root window itself yet because the stack may be using it.
controller->Shutdown();
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, controller);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, controller);
}
void WindowTreeHostManager::OnDisplayRemoved(const gfx::Display& display) {

Powered by Google App Engine
This is Rietveld 408576698