diff options
Diffstat (limited to 'ui/aura')
-rw-r--r-- | ui/aura/desktop/desktop_dispatcher_client.cc | 5 | ||||
-rw-r--r-- | ui/aura/env.h | 5 | ||||
-rw-r--r-- | ui/aura/test/aura_test_helper.cc | 7 |
3 files changed, 11 insertions, 6 deletions
diff --git a/ui/aura/desktop/desktop_dispatcher_client.cc b/ui/aura/desktop/desktop_dispatcher_client.cc index d9a33cf..0228746 100644 --- a/ui/aura/desktop/desktop_dispatcher_client.cc +++ b/ui/aura/desktop/desktop_dispatcher_client.cc @@ -4,6 +4,8 @@ #include "ui/aura/desktop/desktop_dispatcher_client.h" +#include "base/run_loop.h" + namespace aura { DesktopDispatcherClient::DesktopDispatcherClient() {} @@ -24,7 +26,8 @@ void DesktopDispatcherClient::RunWithDispatcher( // DefaultAcceleratorDispatcher dispatcher(nested_dispatcher, // associated_window); - loop->RunWithDispatcher(nested_dispatcher); + base::RunLoop run_loop(nested_dispatcher); + run_loop.Run(); loop->SetNestableTasksAllowed(did_allow_task_nesting); } diff --git a/ui/aura/env.h b/ui/aura/env.h index bef9483..c2b56c7 100644 --- a/ui/aura/env.h +++ b/ui/aura/env.h @@ -68,9 +68,8 @@ class AURA_EXPORT Env { CursorManager* cursor_manager() { return &cursor_manager_; } // Returns the native event dispatcher. The result should only be passed to - // MessageLoopForUI::RunWithDispatcher() or - // MessageLoopForUI::RunAllPendingWithDispatcher(), or used to dispatch - // an event by |Dispatch(const NativeEvent&)| on it. It must never be stored. + // base::RunLoop(dispatcher), or used to dispatch an event by + // |Dispatch(const NativeEvent&)| on it. It must never be stored. #if !defined(OS_MACOSX) MessageLoop::Dispatcher* GetDispatcher(); #endif diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc index 1dabfd4..1453c86 100644 --- a/ui/aura/test/aura_test_helper.cc +++ b/ui/aura/test/aura_test_helper.cc @@ -5,6 +5,7 @@ #include "ui/aura/test/aura_test_helper.h" #include "base/message_loop.h" +#include "base/run_loop.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/env.h" #include "ui/aura/focus_manager.h" @@ -78,8 +79,10 @@ void AuraTestHelper::TearDown() { void AuraTestHelper::RunAllPendingInMessageLoop() { #if !defined(OS_MACOSX) - message_loop_->RunAllPendingWithDispatcher( - Env::GetInstance()->GetDispatcher()); + // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them + // use run_loop.QuitClosure(). + base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); + run_loop.RunUntilIdle(); #endif } |