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

Side by Side Diff: ash/root_window_controller.cc

Issue 100903002: Ignore fullscreen windows which are behind other windows for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 7 years 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 return; 511 return;
512 } 512 }
513 513
514 Shell::GetInstance()->UpdateShelfVisibility(); 514 Shell::GetInstance()->UpdateShelfVisibility();
515 } 515 }
516 516
517 void RootWindowController::UpdateShelfVisibility() { 517 void RootWindowController::UpdateShelfVisibility() {
518 shelf_->shelf_layout_manager()->UpdateVisibilityState(); 518 shelf_->shelf_layout_manager()->UpdateVisibilityState();
519 } 519 }
520 520
521 const aura::Window* RootWindowController::GetTopmostFullscreenWindow() const { 521 const aura::Window* RootWindowController::GetWindowForFullscreenMode() const {
522 const aura::Window::Windows& windows = 522 const aura::Window::Windows& windows =
523 GetContainer(kShellWindowId_DefaultContainer)->children(); 523 GetContainer(kShellWindowId_DefaultContainer)->children();
524 const aura::Window* topmost_window = NULL;
524 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); 525 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
525 iter != windows.rend(); ++iter) { 526 iter != windows.rend(); ++iter) {
526 if (wm::GetWindowState(*iter)->IsFullscreen()) 527 if (((*iter)->type() == aura::client::WINDOW_TYPE_NORMAL ||
527 return *iter; 528 (*iter)->type() == aura::client::WINDOW_TYPE_PANEL) &&
529 (*iter)->layer()->GetTargetVisibility()) {
530 topmost_window = *iter;
531 break;
532 }
533 }
534 while (topmost_window) {
535 if (wm::GetWindowState(topmost_window)->IsFullscreen())
536 return topmost_window;
537 topmost_window = topmost_window->transient_parent();
528 } 538 }
529 return NULL; 539 return NULL;
530 } 540 }
531 541
532 aura::Window* RootWindowController::GetTopmostFullscreenWindow() {
533 return const_cast<aura::Window*>(
534 const_cast<const RootWindowController*>(this)->
535 GetTopmostFullscreenWindow());
536 }
537
538 void RootWindowController::ActivateKeyboard( 542 void RootWindowController::ActivateKeyboard(
539 keyboard::KeyboardController* keyboard_controller) { 543 keyboard::KeyboardController* keyboard_controller) {
540 if (!keyboard::IsKeyboardEnabled() || 544 if (!keyboard::IsKeyboardEnabled() ||
541 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { 545 GetContainer(kShellWindowId_VirtualKeyboardContainer)) {
542 return; 546 return;
543 } 547 }
544 DCHECK(keyboard_controller); 548 DCHECK(keyboard_controller);
545 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { 549 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
546 keyboard_controller->AddObserver(shelf()->shelf_layout_manager()); 550 keyboard_controller->AddObserver(shelf()->shelf_layout_manager());
547 keyboard_controller->AddObserver(panel_layout_manager_); 551 keyboard_controller->AddObserver(panel_layout_manager_);
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 DisableTouchHudProjection(); 933 DisableTouchHudProjection();
930 } 934 }
931 935
932 RootWindowController* GetRootWindowController( 936 RootWindowController* GetRootWindowController(
933 const aura::Window* root_window) { 937 const aura::Window* root_window) {
934 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 938 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
935 } 939 }
936 940
937 } // namespace internal 941 } // namespace internal
938 } // namespace ash 942 } // 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