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

Unified Diff: ash/accelerators/nested_dispatcher_controller.cc

Issue 219743002: x11: Move X event handling out of the message-pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r261267 Created 6 years, 9 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: ash/accelerators/nested_dispatcher_controller.cc
diff --git a/ash/accelerators/nested_dispatcher_controller.cc b/ash/accelerators/nested_dispatcher_controller.cc
index c4b36f9087144156e7fc4c3b3ae24ce0b8a543df..d963db07c81b9632e822a3bb221b1c6ddb7b24ef 100644
--- a/ash/accelerators/nested_dispatcher_controller.cc
+++ b/ash/accelerators/nested_dispatcher_controller.cc
@@ -22,19 +22,23 @@ void NestedDispatcherController::RunWithDispatcher(
base::MessageLoopForUI* loop = base::MessageLoopForUI::current();
base::MessageLoopForUI::ScopedNestableTaskAllower allow_nested(loop);
- AcceleratorDispatcher dispatcher(nested_dispatcher);
+ scoped_ptr<AcceleratorDispatcher> old_accelerator_dispatcher =
+ accelerator_dispatcher_.Pass();
+ accelerator_dispatcher_ = AcceleratorDispatcher::Create(nested_dispatcher);
// TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them
// use run_loop.QuitClosure().
- base::RunLoop run_loop(&dispatcher);
+ scoped_ptr<base::RunLoop> run_loop = accelerator_dispatcher_->CreateRunLoop();
base::AutoReset<base::Closure> reset_closure(&quit_closure_,
- run_loop.QuitClosure());
- run_loop.Run();
+ run_loop->QuitClosure());
+ run_loop->Run();
+ accelerator_dispatcher_ = old_accelerator_dispatcher.Pass();
}
void NestedDispatcherController::QuitNestedMessageLoop() {
CHECK(!quit_closure_.is_null());
quit_closure_.Run();
+ accelerator_dispatcher_.reset();
}
} // namespace ash
« no previous file with comments | « ash/accelerators/nested_dispatcher_controller.h ('k') | ash/accelerators/nested_dispatcher_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698