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

Unified Diff: ui/views/mouse_watcher.cc

Issue 2049493004: Remove use of deprecated MessageLoop methods in ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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: ui/views/mouse_watcher.cc
diff --git a/ui/views/mouse_watcher.cc b/ui/views/mouse_watcher.cc
index 686cb071d939a73020aaa9517401bbc73f65644e..6cfa7ff38ea1895fa0a0008980b0c1e0595a518b 100644
--- a/ui/views/mouse_watcher.cc
+++ b/ui/views/mouse_watcher.cc
@@ -7,9 +7,11 @@
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/event_types.h"
+#include "base/location.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/event_handler.h"
@@ -61,10 +63,9 @@ class MouseWatcher::Observer : public ui::EventHandler {
} else if (!notify_listener_factory_.HasWeakPtrs()) {
// Mouse moved outside the host's zone, start a timer to notify the
// listener.
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&Observer::NotifyListener,
- notify_listener_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&Observer::NotifyListener,
+ notify_listener_factory_.GetWeakPtr()),
event_type == MouseWatcherHost::MOUSE_MOVE
? base::TimeDelta::FromMilliseconds(kNotifyListenerTimeMs)
: mouse_watcher_->notify_on_exit_time_);
« no previous file with comments | « ui/shell_dialogs/select_file_dialog.cc ('k') | ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698