OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ash/accelerators/nested_dispatcher_controller.h" | |
6 | |
7 #include "ash/accelerators/accelerator_dispatcher.h" | |
8 | |
9 namespace ash { | |
10 | |
11 NestedDispatcherController::NestedDispatcherController() { | |
12 aura::client::SetDispatcherClient(this); | |
13 } | |
14 | |
15 void NestedDispatcherController::RunWithDispatcher( | |
16 MessageLoop::Dispatcher* nested_dispatcher, bool nestable_tasks_allowed) { | |
oshima
2012/01/31 18:19:52
one argument per line. (This style has been banned
| |
17 MessageLoopForUI* loop = MessageLoopForUI::current(); | |
18 bool did_allow_task_nesting = loop->NestableTasksAllowed(); | |
19 loop->SetNestableTasksAllowed(nestable_tasks_allowed); | |
20 | |
21 AcceleratorDispatcher dispatcher(nested_dispatcher); | |
22 | |
23 loop->RunWithDispatcher(&dispatcher); | |
24 loop->SetNestableTasksAllowed(did_allow_task_nesting); | |
25 } | |
26 | |
27 } // namespace ash | |
OLD | NEW |