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

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

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/accelerators/nested_dispatcher_controller.h" 5 #include "ash/accelerators/nested_dispatcher_controller.h"
6 6
7 #include "ash/accelerators/accelerator_dispatcher.h" 7 #include "ash/accelerators/accelerator_dispatcher.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 9
10 namespace ash { 10 namespace ash {
11 11
12 NestedDispatcherController::NestedDispatcherController() { 12 NestedDispatcherController::NestedDispatcherController() {
13 aura::client::SetDispatcherClient(Shell::GetRootWindow(), this); 13 aura::client::SetDispatcherClient(Shell::GetPrimaryRootWindow(), this);
14 } 14 }
15 15
16 NestedDispatcherController::~NestedDispatcherController() { 16 NestedDispatcherController::~NestedDispatcherController() {
17 } 17 }
18 18
19 void NestedDispatcherController::RunWithDispatcher( 19 void NestedDispatcherController::RunWithDispatcher(
20 MessageLoop::Dispatcher* nested_dispatcher, 20 MessageLoop::Dispatcher* nested_dispatcher,
21 aura::Window* associated_window, 21 aura::Window* associated_window,
22 bool nestable_tasks_allowed) { 22 bool nestable_tasks_allowed) {
23 MessageLoopForUI* loop = MessageLoopForUI::current(); 23 MessageLoopForUI* loop = MessageLoopForUI::current();
24 bool did_allow_task_nesting = loop->NestableTasksAllowed(); 24 bool did_allow_task_nesting = loop->NestableTasksAllowed();
25 loop->SetNestableTasksAllowed(nestable_tasks_allowed); 25 loop->SetNestableTasksAllowed(nestable_tasks_allowed);
26 26
27 AcceleratorDispatcher dispatcher(nested_dispatcher, associated_window); 27 AcceleratorDispatcher dispatcher(nested_dispatcher, associated_window);
28 28
29 loop->RunWithDispatcher(&dispatcher); 29 loop->RunWithDispatcher(&dispatcher);
30 loop->SetNestableTasksAllowed(did_allow_task_nesting); 30 loop->SetNestableTasksAllowed(did_allow_task_nesting);
31 } 31 }
32 32
33 } // namespace ash 33 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_filter_unittest.cc ('k') | ash/accelerators/nested_dispatcher_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698