| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 bool ShelfLayoutManager::IsHorizontalAlignment() const { | 537 bool ShelfLayoutManager::IsHorizontalAlignment() const { |
| 538 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || | 538 return GetAlignment() == SHELF_ALIGNMENT_BOTTOM || |
| 539 GetAlignment() == SHELF_ALIGNMENT_TOP; | 539 GetAlignment() == SHELF_ALIGNMENT_TOP; |
| 540 } | 540 } |
| 541 | 541 |
| 542 void ShelfLayoutManager::SetChromeVoxPanelHeight(int height) { | 542 void ShelfLayoutManager::SetChromeVoxPanelHeight(int height) { |
| 543 chromevox_panel_height_ = height; | 543 chromevox_panel_height_ = height; |
| 544 LayoutShelf(); | 544 LayoutShelf(); |
| 545 } | 545 } |
| 546 | 546 |
| 547 // static | |
| 548 ShelfLayoutManager* ShelfLayoutManager::ForShelf(aura::Window* window) { | |
| 549 ShelfWidget* shelf = RootWindowController::ForShelf(window)->shelf(); | |
| 550 return shelf ? shelf->shelf_layout_manager() : NULL; | |
| 551 } | |
| 552 | |
| 553 //////////////////////////////////////////////////////////////////////////////// | 547 //////////////////////////////////////////////////////////////////////////////// |
| 554 // ShelfLayoutManager, private: | 548 // ShelfLayoutManager, private: |
| 555 | 549 |
| 556 ShelfLayoutManager::TargetBounds::TargetBounds() | 550 ShelfLayoutManager::TargetBounds::TargetBounds() |
| 557 : opacity(0.0f), status_opacity(0.0f) {} | 551 : opacity(0.0f), status_opacity(0.0f) {} |
| 558 | 552 |
| 559 ShelfLayoutManager::TargetBounds::~TargetBounds() {} | 553 ShelfLayoutManager::TargetBounds::~TargetBounds() {} |
| 560 | 554 |
| 561 void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) { | 555 void ShelfLayoutManager::SetState(ShelfVisibilityState visibility_state) { |
| 562 if (!shelf_->GetNativeView()) | 556 if (!shelf_->GetNativeView()) |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 return false; | 1178 return false; |
| 1185 } | 1179 } |
| 1186 if (session_state_delegate->IsUserSessionBlocked() || | 1180 if (session_state_delegate->IsUserSessionBlocked() || |
| 1187 state_.is_adding_user_screen) { | 1181 state_.is_adding_user_screen) { |
| 1188 return true; | 1182 return true; |
| 1189 } | 1183 } |
| 1190 return false; | 1184 return false; |
| 1191 } | 1185 } |
| 1192 | 1186 |
| 1193 } // namespace ash | 1187 } // namespace ash |
| OLD | NEW |