| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 void ChromeLauncherControllerImpl::ShelfItemChanged( | 1664 void ChromeLauncherControllerImpl::ShelfItemChanged( |
| 1665 int index, | 1665 int index, |
| 1666 const ash::ShelfItem& old_item) {} | 1666 const ash::ShelfItem& old_item) {} |
| 1667 | 1667 |
| 1668 /////////////////////////////////////////////////////////////////////////////// | 1668 /////////////////////////////////////////////////////////////////////////////// |
| 1669 // ash::WindowTreeHostManager::Observer: | 1669 // ash::WindowTreeHostManager::Observer: |
| 1670 | 1670 |
| 1671 void ChromeLauncherControllerImpl::OnDisplayConfigurationChanged() { | 1671 void ChromeLauncherControllerImpl::OnDisplayConfigurationChanged() { |
| 1672 SetShelfBehaviorsFromPrefs(); | 1672 // In BOTTOM_LOCKED state, ignore the call of SetShelfBehaviorsFromPrefs. |
| 1673 // Because it might be called by some operations, like crbug.com/627040 |
| 1674 // rotating screen. |
| 1675 ash::Shelf* shelf = ash::Shelf::ForPrimaryDisplay(); |
| 1676 if (!shelf || shelf->alignment() != ash::SHELF_ALIGNMENT_BOTTOM_LOCKED) |
| 1677 SetShelfBehaviorsFromPrefs(); |
| 1673 } | 1678 } |
| 1674 | 1679 |
| 1675 /////////////////////////////////////////////////////////////////////////////// | 1680 /////////////////////////////////////////////////////////////////////////////// |
| 1676 // AppSyncUIStateObserver: | 1681 // AppSyncUIStateObserver: |
| 1677 | 1682 |
| 1678 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { | 1683 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { |
| 1679 if (app_sync_ui_state_->status() == AppSyncUIState::STATUS_SYNCING) | 1684 if (app_sync_ui_state_->status() == AppSyncUIState::STATUS_SYNCING) |
| 1680 model_->set_status(ash::ShelfModel::STATUS_LOADING); | 1685 model_->set_status(ash::ShelfModel::STATUS_LOADING); |
| 1681 else | 1686 else |
| 1682 model_->set_status(ash::ShelfModel::STATUS_NORMAL); | 1687 model_->set_status(ash::ShelfModel::STATUS_NORMAL); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1701 if (index == -1) | 1706 if (index == -1) |
| 1702 continue; | 1707 continue; |
| 1703 ash::ShelfItem item = model_->items()[index]; | 1708 ash::ShelfItem item = model_->items()[index]; |
| 1704 item.image = image; | 1709 item.image = image; |
| 1705 if (arc_deferred_launcher_) | 1710 if (arc_deferred_launcher_) |
| 1706 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); | 1711 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); |
| 1707 model_->Set(index, item); | 1712 model_->Set(index, item); |
| 1708 // It's possible we're waiting on more than one item, so don't break. | 1713 // It's possible we're waiting on more than one item, so don't break. |
| 1709 } | 1714 } |
| 1710 } | 1715 } |
| OLD | NEW |