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

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

Issue 11293014: Renames Workspace*2 -> Workspace*. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « ash/shell_window_ids.h ('k') | ash/wm/window_cycle_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 iter != containers.end() && !window; ++iter) { 350 iter != containers.end() && !window; ++iter) {
351 window = GetTopmostWindowToActivateInContainer((*iter), ignore); 351 window = GetTopmostWindowToActivateInContainer((*iter), ignore);
352 } 352 }
353 } 353 }
354 return window; 354 return window;
355 } 355 }
356 356
357 aura::Window* ActivationController::GetTopmostWindowToActivateInContainer( 357 aura::Window* ActivationController::GetTopmostWindowToActivateInContainer(
358 aura::Window* container, 358 aura::Window* container,
359 aura::Window* ignore) const { 359 aura::Window* ignore) const {
360 // Workspace2 has an extra level of windows that needs to be special cased. 360 // Workspace has an extra level of windows that needs to be special cased.
361 if (container->id() == kShellWindowId_DefaultContainer) { 361 if (container->id() == kShellWindowId_DefaultContainer) {
362 for (aura::Window::Windows::const_reverse_iterator i = 362 for (aura::Window::Windows::const_reverse_iterator i =
363 container->children().rbegin(); 363 container->children().rbegin();
364 i != container->children().rend(); ++i) { 364 i != container->children().rend(); ++i) {
365 if ((*i)->IsVisible()) { 365 if ((*i)->IsVisible()) {
366 aura::Window* window = GetTopmostWindowToActivateInContainer( 366 aura::Window* window = GetTopmostWindowToActivateInContainer(
367 *i, ignore); 367 *i, ignore);
368 if (window) 368 if (window)
369 return window; 369 return window;
370 } 370 }
371 } 371 }
372 return NULL; 372 return NULL;
373 } 373 }
374 for (aura::Window::Windows::const_reverse_iterator i = 374 for (aura::Window::Windows::const_reverse_iterator i =
375 container->children().rbegin(); 375 container->children().rbegin();
376 i != container->children().rend(); 376 i != container->children().rend();
377 ++i) { 377 ++i) {
378 if (*i != ignore && 378 if (*i != ignore &&
379 CanActivateWindowWithEvent(*i, NULL, CURRENT_VISIBILITY) && 379 CanActivateWindowWithEvent(*i, NULL, CURRENT_VISIBILITY) &&
380 !wm::IsWindowMinimized(*i)) 380 !wm::IsWindowMinimized(*i))
381 return *i; 381 return *i;
382 } 382 }
383 return NULL; 383 return NULL;
384 } 384 }
385 385
386 } // namespace internal 386 } // namespace internal
387 } // namespace ash 387 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell_window_ids.h ('k') | ash/wm/window_cycle_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698