OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |