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

Side by Side Diff: ash/wm/activation_controller.cc

Issue 9264002: aura: Add Ctrl-Shift-Q for quit and Ctrl-Shift-L for lock in chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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/wm/activation_controller.h" 5 #include "ash/wm/activation_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/window_modality_controller.h" 9 #include "ash/wm/window_modality_controller.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void ActivationController::ActivateNextWindow(aura::Window* window) { 200 void ActivationController::ActivateNextWindow(aura::Window* window) {
201 if (IsActiveWindow(window)) 201 if (IsActiveWindow(window))
202 ActivateWindow(GetTopmostWindowToActivate(window)); 202 ActivateWindow(GetTopmostWindowToActivate(window));
203 } 203 }
204 204
205 aura::Window* ActivationController::GetTopmostWindowToActivate( 205 aura::Window* ActivationController::GetTopmostWindowToActivate(
206 aura::Window* ignore) const { 206 aura::Window* ignore) const {
207 const aura::Window* container = 207 const aura::Window* container =
208 default_container_for_test_ ? default_container_for_test_ : 208 default_container_for_test_ ? default_container_for_test_ :
209 GetContainer(kShellWindowId_DefaultContainer); 209 GetContainer(kShellWindowId_DefaultContainer);
210 if (!container)
211 return NULL;
210 for (aura::Window::Windows::const_reverse_iterator i = 212 for (aura::Window::Windows::const_reverse_iterator i =
211 container->children().rbegin(); 213 container->children().rbegin();
212 i != container->children().rend(); 214 i != container->children().rend();
213 ++i) { 215 ++i) {
214 if (*i != ignore && CanActivateWindow(*i)) 216 if (*i != ignore && CanActivateWindow(*i))
215 return *i; 217 return *i;
216 } 218 }
217 return NULL; 219 return NULL;
218 } 220 }
219 221
220 } // namespace internal 222 } // namespace internal
221 } // namespace ash 223 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698