| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 } | 522 } |
| 523 } | 523 } |
| 524 | 524 |
| 525 void ShelfLayoutManager::OnLockStateChanged(bool locked) { | 525 void ShelfLayoutManager::OnLockStateChanged(bool locked) { |
| 526 // Force the shelf to layout for alignment (bottom if locked, restore | 526 // Force the shelf to layout for alignment (bottom if locked, restore |
| 527 // the previous alignment otherwise). | 527 // the previous alignment otherwise). |
| 528 state_.is_screen_locked = locked; | 528 state_.is_screen_locked = locked; |
| 529 UpdateShelfVisibilityAfterLoginUIChange(); | 529 UpdateShelfVisibilityAfterLoginUIChange(); |
| 530 } | 530 } |
| 531 | 531 |
| 532 void ShelfLayoutManager::OnWindowActivated(aura::Window* gained_active, | 532 void ShelfLayoutManager::OnWindowActivated( |
| 533 aura::Window* lost_active) { | 533 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 534 aura::Window* gained_active, |
| 535 aura::Window* lost_active) { |
| 534 UpdateAutoHideStateNow(); | 536 UpdateAutoHideStateNow(); |
| 535 } | 537 } |
| 536 | 538 |
| 537 bool ShelfLayoutManager::IsHorizontalAlignment() const { | 539 bool ShelfLayoutManager::IsHorizontalAlignment() const { |
| 538 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || | 540 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || |
| 539 GetAlignment() == SHELF_ALIGNMENT_TOP; | 541 GetAlignment() == SHELF_ALIGNMENT_TOP; |
| 540 } | 542 } |
| 541 | 543 |
| 542 // static | 544 // static |
| 543 ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) { | 545 ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) { |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 return false; | 1193 return false; |
| 1192 } | 1194 } |
| 1193 if (session_state_delegate->IsUserSessionBlocked() || | 1195 if (session_state_delegate->IsUserSessionBlocked() || |
| 1194 state_.is_adding_user_screen) { | 1196 state_.is_adding_user_screen) { |
| 1195 return true; | 1197 return true; |
| 1196 } | 1198 } |
| 1197 return false; | 1199 return false; |
| 1198 } | 1200 } |
| 1199 | 1201 |
| 1200 } // namespace ash | 1202 } // namespace ash |
| OLD | NEW |