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

Side by Side Diff: ash/accelerators/nested_dispatcher_controller.cc

Issue 9224001: Fixes issue with accelerators when a menu is open (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as requested Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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,
17 bool nestable_tasks_allowed) {
18 MessageLoopForUI* loop = MessageLoopForUI::current();
19 bool did_allow_task_nesting = loop->NestableTasksAllowed();
20 loop->SetNestableTasksAllowed(nestable_tasks_allowed);
21
22 AcceleratorDispatcher dispatcher(nested_dispatcher);
23
24 loop->RunWithDispatcher(&dispatcher);
25 loop->SetNestableTasksAllowed(did_allow_task_nesting);
26 }
27
28 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698