| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 if (WmShell::Get()->GetAppListTargetVisibility()) { | 898 if (WmShell::Get()->GetAppListTargetVisibility()) { |
| 899 WmWindow* window = WmShell::Get()->GetActiveWindow(); | 899 WmWindow* window = WmShell::Get()->GetActiveWindow(); |
| 900 if (window && window->GetDisplayNearestWindow().id() == shelf_display_id) | 900 if (window && window->GetDisplayNearestWindow().id() == shelf_display_id) |
| 901 return SHELF_AUTO_HIDE_SHOWN; | 901 return SHELF_AUTO_HIDE_SHOWN; |
| 902 } | 902 } |
| 903 | 903 |
| 904 if (shelf_widget_->status_area_widget() && | 904 if (shelf_widget_->status_area_widget() && |
| 905 shelf_widget_->status_area_widget()->ShouldShowShelf()) | 905 shelf_widget_->status_area_widget()->ShouldShowShelf()) |
| 906 return SHELF_AUTO_HIDE_SHOWN; | 906 return SHELF_AUTO_HIDE_SHOWN; |
| 907 | 907 |
| 908 if (shelf_widget_->shelf() && shelf_widget_->shelf()->IsShowingMenu()) | 908 if (shelf_widget_->IsShowingContextMenu()) |
| 909 return SHELF_AUTO_HIDE_SHOWN; | 909 return SHELF_AUTO_HIDE_SHOWN; |
| 910 | 910 |
| 911 if (shelf_widget_->shelf() && | 911 if (shelf_widget_->IsShowingOverflowBubble()) |
| 912 shelf_widget_->shelf()->IsShowingOverflowBubble()) | |
| 913 return SHELF_AUTO_HIDE_SHOWN; | 912 return SHELF_AUTO_HIDE_SHOWN; |
| 914 | 913 |
| 915 if (shelf_widget_->IsActive() || | 914 if (shelf_widget_->IsActive() || |
| 916 (shelf_widget_->status_area_widget() && | 915 (shelf_widget_->status_area_widget() && |
| 917 shelf_widget_->status_area_widget()->IsActive())) | 916 shelf_widget_->status_area_widget()->IsActive())) |
| 918 return SHELF_AUTO_HIDE_SHOWN; | 917 return SHELF_AUTO_HIDE_SHOWN; |
| 919 | 918 |
| 920 const std::vector<WmWindow*> windows = | 919 const std::vector<WmWindow*> windows = |
| 921 WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); | 920 WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); |
| 922 | 921 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 gesture_drag_status_ = GESTURE_DRAG_NONE; | 1176 gesture_drag_status_ = GESTURE_DRAG_NONE; |
| 1178 } | 1177 } |
| 1179 | 1178 |
| 1180 int ShelfLayoutManager::GetShelfInsetsForAutoHide() const { | 1179 int ShelfLayoutManager::GetShelfInsetsForAutoHide() const { |
| 1181 if (invisible_auto_hide_shelf_) | 1180 if (invisible_auto_hide_shelf_) |
| 1182 return 0; | 1181 return 0; |
| 1183 return GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); | 1182 return GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); |
| 1184 } | 1183 } |
| 1185 | 1184 |
| 1186 } // namespace ash | 1185 } // namespace ash |
| OLD | NEW |