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

Unified Diff: ash/display/display_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/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 2ec5afb40592cf9755d72788a760c8f7605c1583..fc5f8b8b0d60fcf2c201e7e018cd399535e60e8e 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -29,6 +29,7 @@
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/thread_task_runner_handle.h"
#include "grit/ash_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/display.h"
@@ -1050,10 +1051,9 @@ void DisplayManager::CreateMirrorWindowAsyncIfAny() {
// ash::Shell::Init() will call this after the compositor is initialized.
if (software_mirroring_display_list_.empty() || !delegate_)
return;
- base::MessageLoopForUI::current()->PostTask(
- FROM_HERE,
- base::Bind(&DisplayManager::CreateMirrorWindowIfAny,
- weak_ptr_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&DisplayManager::CreateMirrorWindowIfAny,
+ weak_ptr_factory_.GetWeakPtr()));
}
scoped_ptr<MouseWarpController> DisplayManager::CreateMouseWarpController(

Powered by Google App Engine
This is Rietveld 408576698