| 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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1055 return SHELF_AUTO_HIDE_SHOWN; | 1055 return SHELF_AUTO_HIDE_SHOWN; |
| 1056 | 1056 |
| 1057 if (shelf_widget_->IsActive() || | 1057 if (shelf_widget_->IsActive() || |
| 1058 (shelf_widget_->status_area_widget() && | 1058 (shelf_widget_->status_area_widget() && |
| 1059 shelf_widget_->status_area_widget()->IsActive())) | 1059 shelf_widget_->status_area_widget()->IsActive())) |
| 1060 return SHELF_AUTO_HIDE_SHOWN; | 1060 return SHELF_AUTO_HIDE_SHOWN; |
| 1061 | 1061 |
| 1062 // TODO(jamescook): Track visible windows on mash via ShelfDelegate. | 1062 // TODO(jamescook): Track visible windows on mash via ShelfDelegate. |
| 1063 if (!Shell::GetInstance()->in_mus()) { | 1063 if (!Shell::GetInstance()->in_mus()) { |
| 1064 const std::vector<WmWindow*> windows = | 1064 const std::vector<WmWindow*> windows = |
| 1065 shell->mru_window_tracker()->BuildWindowListIgnoreModal(); | 1065 WmShell::Get()->mru_window_tracker()->BuildWindowListIgnoreModal(); |
| 1066 | 1066 |
| 1067 // Process the window list and check if there are any visible windows. | 1067 // Process the window list and check if there are any visible windows. |
| 1068 bool visible_window = false; | 1068 bool visible_window = false; |
| 1069 for (size_t i = 0; i < windows.size(); ++i) { | 1069 for (size_t i = 0; i < windows.size(); ++i) { |
| 1070 if (windows[i] && windows[i]->IsVisible() && | 1070 if (windows[i] && windows[i]->IsVisible() && |
| 1071 !windows[i]->GetWindowState()->IsMinimized() && | 1071 !windows[i]->GetWindowState()->IsMinimized() && |
| 1072 root_window_ == | 1072 root_window_ == |
| 1073 WmWindowAura::GetAuraWindow(windows[i]->GetRootWindow())) { | 1073 WmWindowAura::GetAuraWindow(windows[i]->GetRootWindow())) { |
| 1074 visible_window = true; | 1074 visible_window = true; |
| 1075 break; | 1075 break; |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1207 if (ash::MaterialDesignController::IsShelfMaterial()) { | 1207 if (ash::MaterialDesignController::IsShelfMaterial()) { |
| 1208 return (state.visibility_state == SHELF_AUTO_HIDE && | 1208 return (state.visibility_state == SHELF_AUTO_HIDE && |
| 1209 state.auto_hide_state == SHELF_AUTO_HIDE_SHOWN) | 1209 state.auto_hide_state == SHELF_AUTO_HIDE_SHOWN) |
| 1210 ? 1.0f | 1210 ? 1.0f |
| 1211 : 0.0f; | 1211 : 0.0f; |
| 1212 } | 1212 } |
| 1213 return (state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f; | 1213 return (state.visibility_state == SHELF_AUTO_HIDE) ? 1.0f : 0.0f; |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 } // namespace ash | 1216 } // namespace ash |
| OLD | NEW |