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

Side by Side Diff: ash/shelf/shelf_layout_manager.cc

Issue 12618014: Switch Next Window Key functionality (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: protect against alt+tab+switch_windows interaction Created 7 years, 9 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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 alignment_ == SHELF_ALIGNMENT_LEFT ? 853 alignment_ == SHELF_ALIGNMENT_LEFT ?
854 -kNotificationBubbleGapHeight : 0, 854 -kNotificationBubbleGapHeight : 0,
855 alignment_ == SHELF_ALIGNMENT_TOP ? 855 alignment_ == SHELF_ALIGNMENT_TOP ?
856 -kNotificationBubbleGapHeight : 0); 856 -kNotificationBubbleGapHeight : 0);
857 } 857 }
858 858
859 if (shelf_region.Contains(Shell::GetScreen()->GetCursorScreenPoint())) 859 if (shelf_region.Contains(Shell::GetScreen()->GetCursorScreenPoint()))
860 return SHELF_AUTO_HIDE_SHOWN; 860 return SHELF_AUTO_HIDE_SHOWN;
861 861
862 const std::vector<aura::Window*> windows = 862 const std::vector<aura::Window*> windows =
863 ash::WindowCycleController::BuildWindowList(NULL); 863 ash::WindowCycleController::BuildWindowList(NULL, false);
864 864
865 // Process the window list and check if there are any visible windows. 865 // Process the window list and check if there are any visible windows.
866 for (size_t i = 0; i < windows.size(); ++i) { 866 for (size_t i = 0; i < windows.size(); ++i) {
867 if (windows[i] && windows[i]->IsVisible() && 867 if (windows[i] && windows[i]->IsVisible() &&
868 !ash::wm::IsWindowMinimized(windows[i])) 868 !ash::wm::IsWindowMinimized(windows[i]))
869 return SHELF_AUTO_HIDE_HIDDEN; 869 return SHELF_AUTO_HIDE_HIDDEN;
870 } 870 }
871 871
872 // If there are no visible windows do not hide the shelf. 872 // If there are no visible windows do not hide the shelf.
873 return SHELF_AUTO_HIDE_SHOWN; 873 return SHELF_AUTO_HIDE_SHOWN;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { 914 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const {
915 if (state.visibility_state == SHELF_VISIBLE) 915 if (state.visibility_state == SHELF_VISIBLE)
916 return size; 916 return size;
917 if (state.visibility_state == SHELF_AUTO_HIDE) 917 if (state.visibility_state == SHELF_AUTO_HIDE)
918 return kAutoHideSize; 918 return kAutoHideSize;
919 return 0; 919 return 0;
920 } 920 }
921 921
922 } // namespace internal 922 } // namespace internal
923 } // namespace ash 923 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698