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

Side by Side Diff: ash/root_window_controller.cc

Issue 1157843009: Added wm::IsWindowUserPositionable(...) method in window_util.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added WindowState::IsUserPositionable() method. Created 5 years, 6 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
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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 // window is open. We only use the active window when in a switchable 606 // window is open. We only use the active window when in a switchable
607 // container as the launcher should not exit fullscreen mode. 607 // container as the launcher should not exit fullscreen mode.
608 topmost_window = active_window; 608 topmost_window = active_window;
609 } else { 609 } else {
610 // Otherwise, use the topmost window on the root window's default container 610 // Otherwise, use the topmost window on the root window's default container
611 // when there is no active window on this root window. 611 // when there is no active window on this root window.
612 const aura::Window::Windows& windows = 612 const aura::Window::Windows& windows =
613 GetContainer(kShellWindowId_DefaultContainer)->children(); 613 GetContainer(kShellWindowId_DefaultContainer)->children();
614 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin(); 614 for (aura::Window::Windows::const_reverse_iterator iter = windows.rbegin();
615 iter != windows.rend(); ++iter) { 615 iter != windows.rend(); ++iter) {
616 if (((*iter)->type() == ui::wm::WINDOW_TYPE_NORMAL || 616 if (wm::IsWindowUserPositionable(*iter) &&
617 (*iter)->type() == ui::wm::WINDOW_TYPE_PANEL) &&
618 (*iter)->layer()->GetTargetVisibility()) { 617 (*iter)->layer()->GetTargetVisibility()) {
619 topmost_window = *iter; 618 topmost_window = *iter;
620 break; 619 break;
621 } 620 }
622 } 621 }
623 } 622 }
624 while (topmost_window) { 623 while (topmost_window) {
625 if (wm::GetWindowState(topmost_window)->IsFullscreen()) 624 if (wm::GetWindowState(topmost_window)->IsFullscreen())
626 return topmost_window; 625 return topmost_window;
627 topmost_window = ::wm::GetTransientParent(topmost_window); 626 topmost_window = ::wm::GetTransientParent(topmost_window);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 else 1059 else
1061 DisableTouchHudProjection(); 1060 DisableTouchHudProjection();
1062 } 1061 }
1063 1062
1064 RootWindowController* GetRootWindowController( 1063 RootWindowController* GetRootWindowController(
1065 const aura::Window* root_window) { 1064 const aura::Window* root_window) {
1066 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; 1065 return root_window ? GetRootWindowSettings(root_window)->controller : NULL;
1067 } 1066 }
1068 1067
1069 } // namespace ash 1068 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698