Chromium Code Reviews| 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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 } | 472 } |
| 473 | 473 |
| 474 ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const { | 474 ShelfBackgroundType ShelfLayoutManager::GetShelfBackgroundType() const { |
| 475 if (state_.pre_lock_screen_animation_active) | 475 if (state_.pre_lock_screen_animation_active) |
| 476 return SHELF_BACKGROUND_DEFAULT; | 476 return SHELF_BACKGROUND_DEFAULT; |
| 477 | 477 |
| 478 // Handle all non active screen states, including OOBE and pre-login. | 478 // Handle all non active screen states, including OOBE and pre-login. |
| 479 if (state_.session_state != session_manager::SessionState::ACTIVE) | 479 if (state_.session_state != session_manager::SessionState::ACTIVE) |
| 480 return SHELF_BACKGROUND_OVERLAP; | 480 return SHELF_BACKGROUND_OVERLAP; |
| 481 | 481 |
| 482 // If the app list is active and the shelf is oriented vertically, enable the | |
| 483 // shelf background. | |
| 484 if (is_app_list_visible_ && !shelf_->IsHorizontalAlignment() && | |
| 485 app_list::features::IsFullscreenAppListEnabled()) | |
|
James Cook
2017/06/21 23:57:33
IsFullscreenAppListEnabled() runs a non-trivial am
newcomer
2017/06/22 00:16:09
I picked option 2 because that's what I've done el
| |
| 486 return SHELF_BACKGROUND_OVERLAP; | |
| 487 | |
| 482 // If the app list is active, hide the shelf background to prevent overlap. | 488 // If the app list is active, hide the shelf background to prevent overlap. |
| 483 if (is_app_list_visible_ && app_list::features::IsFullscreenAppListEnabled()) | 489 if (is_app_list_visible_ && app_list::features::IsFullscreenAppListEnabled()) |
| 484 return SHELF_BACKGROUND_DEFAULT; | 490 return SHELF_BACKGROUND_DEFAULT; |
| 485 | 491 |
| 486 if (state_.visibility_state != SHELF_AUTO_HIDE && | 492 if (state_.visibility_state != SHELF_AUTO_HIDE && |
| 487 state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) { | 493 state_.window_state == wm::WORKSPACE_WINDOW_STATE_MAXIMIZED) { |
| 488 return SHELF_BACKGROUND_MAXIMIZED; | 494 return SHELF_BACKGROUND_MAXIMIZED; |
| 489 } | 495 } |
| 490 | 496 |
| 491 if (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS || | 497 if (gesture_drag_status_ == GESTURE_DRAG_IN_PROGRESS || |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1163 return gesture_drag_amount_ < 0; | 1169 return gesture_drag_amount_ < 0; |
| 1164 case SHELF_ALIGNMENT_LEFT: | 1170 case SHELF_ALIGNMENT_LEFT: |
| 1165 if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN) | 1171 if (gesture_drag_auto_hide_state_ == SHELF_AUTO_HIDE_SHOWN) |
| 1166 return gesture_drag_amount_ < 0; | 1172 return gesture_drag_amount_ < 0; |
| 1167 return gesture_drag_amount_ > 0; | 1173 return gesture_drag_amount_ > 0; |
| 1168 } | 1174 } |
| 1169 return false; | 1175 return false; |
| 1170 } | 1176 } |
| 1171 | 1177 |
| 1172 } // namespace ash | 1178 } // namespace ash |
| OLD | NEW |