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 <cstring> | 9 #include <cstring> |
10 #include <string> | 10 #include <string> |
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 | 1024 |
1025 if (shelf_->shelf() && shelf_->shelf()->IsShowingOverflowBubble()) | 1025 if (shelf_->shelf() && shelf_->shelf()->IsShowingOverflowBubble()) |
1026 return SHELF_AUTO_HIDE_SHOWN; | 1026 return SHELF_AUTO_HIDE_SHOWN; |
1027 | 1027 |
1028 if (shelf_->IsActive() || | 1028 if (shelf_->IsActive() || |
1029 (shelf_->status_area_widget() && | 1029 (shelf_->status_area_widget() && |
1030 shelf_->status_area_widget()->IsActive())) | 1030 shelf_->status_area_widget()->IsActive())) |
1031 return SHELF_AUTO_HIDE_SHOWN; | 1031 return SHELF_AUTO_HIDE_SHOWN; |
1032 | 1032 |
1033 const std::vector<aura::Window*> windows = | 1033 const std::vector<aura::Window*> windows = |
1034 ash::MruWindowTracker::BuildWindowList(false); | 1034 ash::MruWindowTracker::BuildWindowList(); |
1035 | 1035 |
1036 // Process the window list and check if there are any visible windows. | 1036 // Process the window list and check if there are any visible windows. |
1037 bool visible_window = false; | 1037 bool visible_window = false; |
1038 for (size_t i = 0; i < windows.size(); ++i) { | 1038 for (size_t i = 0; i < windows.size(); ++i) { |
1039 if (windows[i] && windows[i]->IsVisible() && | 1039 if (windows[i] && windows[i]->IsVisible() && |
1040 !wm::GetWindowState(windows[i])->IsMinimized() && | 1040 !wm::GetWindowState(windows[i])->IsMinimized() && |
1041 root_window_ == windows[i]->GetRootWindow()) { | 1041 root_window_ == windows[i]->GetRootWindow()) { |
1042 visible_window = true; | 1042 visible_window = true; |
1043 break; | 1043 break; |
1044 } | 1044 } |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 } | 1180 } |
1181 | 1181 |
1182 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { | 1182 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { |
1183 shelf_->SetAlignment(state_.is_adding_user_screen || state_.is_screen_locked ? | 1183 shelf_->SetAlignment(state_.is_adding_user_screen || state_.is_screen_locked ? |
1184 SHELF_ALIGNMENT_BOTTOM : alignment_); | 1184 SHELF_ALIGNMENT_BOTTOM : alignment_); |
1185 UpdateVisibilityState(); | 1185 UpdateVisibilityState(); |
1186 LayoutShelf(); | 1186 LayoutShelf(); |
1187 } | 1187 } |
1188 | 1188 |
1189 } // namespace ash | 1189 } // namespace ash |
OLD | NEW |