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

Side by Side Diff: ash/root_window_controller.cc

Issue 23534049: RootWindowController::GetFullscreenWindow() should return the active one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 3 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
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_constants.h" 10 #include "ash/ash_constants.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 return; 494 return;
495 } 495 }
496 496
497 Shell::GetInstance()->UpdateShelfVisibility(); 497 Shell::GetInstance()->UpdateShelfVisibility();
498 } 498 }
499 499
500 void RootWindowController::UpdateShelfVisibility() { 500 void RootWindowController::UpdateShelfVisibility() {
501 shelf_->shelf_layout_manager()->UpdateVisibilityState(); 501 shelf_->shelf_layout_manager()->UpdateVisibilityState();
502 } 502 }
503 503
504 const aura::Window* RootWindowController::GetFullscreenWindow() const { 504 const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const {
505 const aura::Window* container = GetContainer(kShellWindowId_DefaultContainer); 505 const aura::Window* container = GetContainer(kShellWindowId_DefaultContainer);
506 for (size_t i = 0; i < container->children().size(); ++i) { 506 for (int i = container->children().size() - 1; i >= 0; --i) {
sky 2013/09/05 16:21:59 How about a reverse iterator so I don't have to wo
Jun Mukai 2013/09/05 18:30:53 Done.
507 aura::Window* child = container->children()[i]; 507 aura::Window* child = container->children()[i];
508 if (wm::IsWindowFullscreen(child)) 508 if (wm::IsWindowFullscreen(child))
509 return child; 509 return child;
510 } 510 }
511 return NULL; 511 return NULL;
512 } 512 }
513 513
514 void RootWindowController::InitKeyboard() { 514 void RootWindowController::InitKeyboard() {
515 if (keyboard::IsKeyboardEnabled()) { 515 if (keyboard::IsKeyboardEnabled()) {
516 aura::Window* parent = root_window(); 516 aura::Window* parent = root_window();
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 808
809 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { 809 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
810 if (enabled) 810 if (enabled)
811 EnableTouchHudProjection(); 811 EnableTouchHudProjection();
812 else 812 else
813 DisableTouchHudProjection(); 813 DisableTouchHudProjection();
814 } 814 }
815 815
816 } // namespace internal 816 } // namespace internal
817 } // namespace ash 817 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/root_window_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698