| 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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 alignment_ == SHELF_ALIGNMENT_LEFT ? | 839 alignment_ == SHELF_ALIGNMENT_LEFT ? |
| 840 -kNotificationBubbleGapHeight : 0, | 840 -kNotificationBubbleGapHeight : 0, |
| 841 alignment_ == SHELF_ALIGNMENT_TOP ? | 841 alignment_ == SHELF_ALIGNMENT_TOP ? |
| 842 -kNotificationBubbleGapHeight : 0); | 842 -kNotificationBubbleGapHeight : 0); |
| 843 } | 843 } |
| 844 | 844 |
| 845 if (shelf_region.Contains(Shell::GetScreen()->GetCursorScreenPoint())) | 845 if (shelf_region.Contains(Shell::GetScreen()->GetCursorScreenPoint())) |
| 846 return SHELF_AUTO_HIDE_SHOWN; | 846 return SHELF_AUTO_HIDE_SHOWN; |
| 847 | 847 |
| 848 const std::vector<aura::Window*> windows = | 848 const std::vector<aura::Window*> windows = |
| 849 ash::WindowCycleController::BuildWindowList(NULL); | 849 ash::WindowCycleController::BuildWindowList(NULL, false); |
| 850 | 850 |
| 851 // Process the window list and check if there are any visible windows. | 851 // Process the window list and check if there are any visible windows. |
| 852 for (size_t i = 0; i < windows.size(); ++i) { | 852 for (size_t i = 0; i < windows.size(); ++i) { |
| 853 if (windows[i] && windows[i]->IsVisible() && | 853 if (windows[i] && windows[i]->IsVisible() && |
| 854 !ash::wm::IsWindowMinimized(windows[i])) | 854 !ash::wm::IsWindowMinimized(windows[i])) |
| 855 return SHELF_AUTO_HIDE_HIDDEN; | 855 return SHELF_AUTO_HIDE_HIDDEN; |
| 856 } | 856 } |
| 857 | 857 |
| 858 // If there are no visible windows do not hide the shelf. | 858 // If there are no visible windows do not hide the shelf. |
| 859 return SHELF_AUTO_HIDE_SHOWN; | 859 return SHELF_AUTO_HIDE_SHOWN; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { | 900 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { |
| 901 if (state.visibility_state == SHELF_VISIBLE) | 901 if (state.visibility_state == SHELF_VISIBLE) |
| 902 return size; | 902 return size; |
| 903 if (state.visibility_state == SHELF_AUTO_HIDE) | 903 if (state.visibility_state == SHELF_AUTO_HIDE) |
| 904 return kAutoHideSize; | 904 return kAutoHideSize; |
| 905 return 0; | 905 return 0; |
| 906 } | 906 } |
| 907 | 907 |
| 908 } // namespace internal | 908 } // namespace internal |
| 909 } // namespace ash | 909 } // namespace ash |
| OLD | NEW |