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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.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/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 14e3a578111af56b4d71cd2de0d2c8e36d7e6e17..5d6548a9861d71c02de96a8afdae230e7c7789aa 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -4,19 +4,22 @@
#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
+#include <X11/extensions/shape.h>
+#include <X11/extensions/XInput2.h>
#include <X11/Xatom.h>
#include <X11/Xregion.h>
#include <X11/Xutil.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/extensions/shape.h>
#include <utility>
#include "base/command_line.h"
+#include "base/location.h"
#include "base/memory/ptr_util.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/trace_event.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/aura/client/cursor_client.h"
@@ -344,10 +347,9 @@ void DesktopWindowTreeHostX11::Close() {
// we don't destroy the window before the callback returned (as the caller
// may delete ourselves on destroy and the ATL callback would still
// dereference us when the callback returns).
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&DesktopWindowTreeHostX11::CloseNow,
- close_widget_factory_.GetWeakPtr()));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&DesktopWindowTreeHostX11::CloseNow,
+ close_widget_factory_.GetWeakPtr()));
}
}
@@ -1812,7 +1814,7 @@ uint32_t DesktopWindowTreeHostX11::DispatchEvent(
delayed_resize_task_.Reset(base::Bind(
&DesktopWindowTreeHostX11::DelayedResize,
close_widget_factory_.GetWeakPtr(), bounds_in_pixels.size()));
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, delayed_resize_task_.callback());
}
break;
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11_unittest.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698