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

Unified Diff: ui/aura/test/ui_controls_factory_ozone.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/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/ime/chromeos/ime_keyboard_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/ui_controls_factory_ozone.cc
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index 10cb38c18802f93aa2005e37b431b4be874e55ef..fb839838fe1d374da726473fb61571f6bd24d18d 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -3,8 +3,11 @@
// found in the LICENSE file.
#include "base/bind.h"
+#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/env.h"
#include "ui/aura/test/aura_test_utils.h"
@@ -173,7 +176,7 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
void RunClosureAfterAllPendingUIEvents(
const base::Closure& closure) override {
if (!closure.is_null())
- base::MessageLoop::current()->PostTask(FROM_HERE, closure);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, closure);
}
private:
@@ -186,13 +189,9 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
}
void PostKeyEvent(ui::EventType type, ui::KeyboardCode key_code, int flags) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&UIControlsOzone::PostKeyEventTask,
- base::Unretained(this),
- type,
- key_code,
- flags));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&UIControlsOzone::PostKeyEventTask,
+ base::Unretained(this), type, key_code, flags));
}
void PostKeyEventTask(ui::EventType type,
@@ -209,7 +208,7 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
const gfx::Point& host_location,
int flags,
int changed_button_flags) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&UIControlsOzone::PostMouseEventTask, base::Unretained(this),
type, host_location, flags, changed_button_flags));
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/base/ime/chromeos/ime_keyboard_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698