| Index: ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
|
| diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
|
| index 251dad6259235803d9a2433fd8c004d281ee73d0..1258c61c9cd0a16e6739f9f2834e4eed7e920008 100644
|
| --- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
|
| +++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
|
| @@ -10,10 +10,12 @@
|
| #include <utility>
|
|
|
| #include "base/bind.h"
|
| +#include "base/logging.h"
|
| #include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/run_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| +#include "base/threading/thread_task_runner_handle.h"
|
| #include "ui/aura/client/capture_client.h"
|
| #include "ui/aura/env.h"
|
| #include "ui/aura/window.h"
|
| @@ -73,6 +75,8 @@ bool X11WholeScreenMoveLoop::CanDispatchEvent(const ui::PlatformEvent& event) {
|
| }
|
|
|
| uint32_t X11WholeScreenMoveLoop::DispatchEvent(const ui::PlatformEvent& event) {
|
| + DCHECK(base::MessageLoopForUI::IsCurrent());
|
| +
|
| // This method processes all events while the move loop is active.
|
| if (!in_move_loop_)
|
| return ui::POST_DISPATCH_PERFORM_DEFAULT;
|
| @@ -91,7 +95,7 @@ uint32_t X11WholeScreenMoveLoop::DispatchEvent(const ui::PlatformEvent& event) {
|
| // Post a task to dispatch mouse movement event when control returns to
|
| // the message loop. This allows smoother dragging since the events are
|
| // dispatched without waiting for the drag widget updates.
|
| - base::MessageLoopForUI::current()->task_runner()->PostTask(
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&X11WholeScreenMoveLoop::DispatchMouseMovement,
|
| weak_factory_.GetWeakPtr()));
|
|
|