| 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/wm/shelf_layout_manager.h" | 5 #include "ash/wm/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
| 10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 ShelfLayoutManager::AutoHideState ShelfLayoutManager::CalculateAutoHideState( | 538 ShelfLayoutManager::AutoHideState ShelfLayoutManager::CalculateAutoHideState( |
| 539 VisibilityState visibility_state) const { | 539 VisibilityState visibility_state) const { |
| 540 if (visibility_state != AUTO_HIDE || !launcher_widget()) | 540 if (visibility_state != AUTO_HIDE || !launcher_widget()) |
| 541 return AUTO_HIDE_HIDDEN; | 541 return AUTO_HIDE_HIDDEN; |
| 542 | 542 |
| 543 Shell* shell = Shell::GetInstance(); | 543 Shell* shell = Shell::GetInstance(); |
| 544 if (shell->GetAppListTargetVisibility()) | 544 if (shell->GetAppListTargetVisibility()) |
| 545 return AUTO_HIDE_SHOWN; | 545 return AUTO_HIDE_SHOWN; |
| 546 | 546 |
| 547 if (shell->system_tray() && shell->system_tray()->should_show_launcher()) | 547 if (shell->status_area_widget() && |
| 548 shell->status_area_widget()->should_show_launcher()) |
| 548 return AUTO_HIDE_SHOWN; | 549 return AUTO_HIDE_SHOWN; |
| 549 | 550 |
| 550 if (launcher_ && launcher_->IsShowingMenu()) | 551 if (launcher_ && launcher_->IsShowingMenu()) |
| 551 return AUTO_HIDE_SHOWN; | 552 return AUTO_HIDE_SHOWN; |
| 552 | 553 |
| 553 if (launcher_ && launcher_->IsShowingOverflowBubble()) | 554 if (launcher_ && launcher_->IsShowingOverflowBubble()) |
| 554 return AUTO_HIDE_SHOWN; | 555 return AUTO_HIDE_SHOWN; |
| 555 | 556 |
| 556 if (launcher_widget()->IsActive() || status_->IsActive()) | 557 if (launcher_widget()->IsActive() || status_->IsActive()) |
| 557 return AUTO_HIDE_SHOWN; | 558 return AUTO_HIDE_SHOWN; |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { | 604 int ShelfLayoutManager::GetWorkAreaSize(const State& state, int size) const { |
| 604 if (state.visibility_state == VISIBLE) | 605 if (state.visibility_state == VISIBLE) |
| 605 return size; | 606 return size; |
| 606 if (state.visibility_state == AUTO_HIDE) | 607 if (state.visibility_state == AUTO_HIDE) |
| 607 return kAutoHideSize; | 608 return kAutoHideSize; |
| 608 return 0; | 609 return 0; |
| 609 } | 610 } |
| 610 | 611 |
| 611 } // namespace internal | 612 } // namespace internal |
| 612 } // namespace ash | 613 } // namespace ash |
| OLD | NEW |