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

Unified Diff: ui/base/win/osk_display_manager.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/base/test/ui_controls_internal_win.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/win/osk_display_manager.cc
diff --git a/ui/base/win/osk_display_manager.cc b/ui/base/win/osk_display_manager.cc
index 17817c7ae2d504100d00e47d53ffee31502ecb46..251f59c83832be35bd23db239c7d4fda82dd69c0 100644
--- a/ui/base/win/osk_display_manager.cc
+++ b/ui/base/win/osk_display_manager.cc
@@ -11,9 +11,11 @@
#include "base/bind.h"
#include "base/debug/leak_annotations.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/string_util.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/win/registry.h"
#include "base/win/scoped_co_mem.h"
#include "base/win/win_util.h"
@@ -122,7 +124,7 @@ void OnScreenKeyboardDetector::DetectKeyboard(HWND main_window) {
// OnScreenKeyboardDisplayManager::DisplayVirtualKeyboard() function. We use
// a delayed task to check if the keyboard is visible because of the possible
// delay between the ShellExecute call and the keyboard becoming visible.
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&OnScreenKeyboardDetector::CheckIfKeyboardVisible,
keyboard_detector_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kCheckOSKDelayMs));
@@ -143,7 +145,7 @@ bool OnScreenKeyboardDetector::DismissKeyboard() {
keyboard_dismiss_retry_count_++;
// Please refer to the comments in the DetectKeyboard() function for more
// information as to why we need a delayed task here.
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(base::IgnoreResult(
&OnScreenKeyboardDetector::DismissKeyboard),
keyboard_detector_factory_.GetWeakPtr()),
@@ -206,7 +208,7 @@ void OnScreenKeyboardDetector::HideIfNecessary() {
DismissKeyboard();
}
} else {
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&OnScreenKeyboardDetector::HideIfNecessary,
keyboard_detector_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kCheckOSKDelayMs));
@@ -221,7 +223,7 @@ void OnScreenKeyboardDetector::HandleKeyboardVisible() {
OnKeyboardVisible(osk_rect_pixels_));
// Now that the keyboard is visible, run the task to detect if it was hidden.
- base::MessageLoop::current()->PostDelayedTask(
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::Bind(&OnScreenKeyboardDetector::HideIfNecessary,
keyboard_detector_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(kCheckOSKDelayMs));
« no previous file with comments | « ui/base/test/ui_controls_internal_win.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698