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

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: Remove static cast. 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
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_POPUP &&
oshima 2013/12/05 19:08:58 can this be == TYPE_NORMAL?
flackr 2013/12/05 19:30:21 == TYPE_NORMAL || == TYPE_PANEL Done.
527 return *iter; 528 (*iter)->layer()->GetTargetVisibility()) {
529 topmost_window = *iter;
530 break;
531 }
532 }
533 while (topmost_window) {
534 if (wm::GetWindowState(topmost_window)->IsFullscreen())
535 return topmost_window;
536 topmost_window = topmost_window->transient_parent();
528 } 537 }
529 return NULL; 538 return NULL;
530 } 539 }
531 540
532 aura::Window* RootWindowController::GetTopmostFullscreenWindow() { 541 aura::Window* RootWindowController::GetWindowForFullscreenMode() {
533 return const_cast<aura::Window*>( 542 return const_cast<aura::Window*>(
534 const_cast<const RootWindowController*>(this)-> 543 const_cast<const RootWindowController*>(this)->
535 GetTopmostFullscreenWindow()); 544 GetWindowForFullscreenMode());
536 } 545 }
537 546
538 void RootWindowController::ActivateKeyboard( 547 void RootWindowController::ActivateKeyboard(
539 keyboard::KeyboardController* keyboard_controller) { 548 keyboard::KeyboardController* keyboard_controller) {
540 if (!keyboard::IsKeyboardEnabled() || 549 if (!keyboard::IsKeyboardEnabled() ||
541 GetContainer(kShellWindowId_VirtualKeyboardContainer)) { 550 GetContainer(kShellWindowId_VirtualKeyboardContainer)) {
542 return; 551 return;
543 } 552 }
544 DCHECK(keyboard_controller); 553 DCHECK(keyboard_controller);
545 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { 554 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 DisableTouchHudProjection(); 938 DisableTouchHudProjection();
930 } 939 }
931 940
932 RootWindowController* GetRootWindowController( 941 RootWindowController* GetRootWindowController(
933 const aura::Window* root_window) { 942 const aura::Window* root_window) {
934 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 943 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
935 } 944 }
936 945
937 } // namespace internal 946 } // namespace internal
938 } // namespace ash 947 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698