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

Unified Diff: ui/ozone/platform/caca/caca_window.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
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | ui/shell_dialogs/select_file_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/caca/caca_window.cc
diff --git a/ui/ozone/platform/caca/caca_window.cc b/ui/ozone/platform/caca/caca_window.cc
index 16be1885fdcfcbfa02c23660742d77bfd30b61b0..821a898162847a43f1a29f1198b17daaed2b9a4b 100644
--- a/ui/ozone/platform/caca/caca_window.cc
+++ b/ui/ozone/platform/caca/caca_window.cc
@@ -5,9 +5,11 @@
#include "ui/ozone/platform/caca/caca_window.h"
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "ui/events/ozone/events_ozone.h"
#include "ui/events/platform/platform_event_source.h"
@@ -77,10 +79,9 @@ void CacaWindow::TryProcessingEvent() {
// Caca uses a poll based event retrieval. Since we don't want to block we'd
// either need to spin up a new thread or just poll. For simplicity just poll
// for messages.
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&CacaWindow::TryProcessingEvent,
- weak_ptr_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&CacaWindow::TryProcessingEvent,
+ weak_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(10));
}
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | ui/shell_dialogs/select_file_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698