Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.cc

Issue 2137083004: Fix overlapping of shelf options on supervised user creation page when rotating screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check primary display shelf exists before call alignment() Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // 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 return;
stevenjb 2016/07/11 22:04:24 nit: Normally we prefer early exit like this, howe
Qiang(Joe) Xu 2016/07/11 22:27:52 done. tks for this tip.
1672 SetShelfBehaviorsFromPrefs(); 1678 SetShelfBehaviorsFromPrefs();
1673 } 1679 }
1674 1680
1675 /////////////////////////////////////////////////////////////////////////////// 1681 ///////////////////////////////////////////////////////////////////////////////
1676 // AppSyncUIStateObserver: 1682 // AppSyncUIStateObserver:
1677 1683
1678 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() { 1684 void ChromeLauncherControllerImpl::OnAppSyncUIStatusChanged() {
1679 if (app_sync_ui_state_->status() == AppSyncUIState::STATUS_SYNCING) 1685 if (app_sync_ui_state_->status() == AppSyncUIState::STATUS_SYNCING)
1680 model_->set_status(ash::ShelfModel::STATUS_LOADING); 1686 model_->set_status(ash::ShelfModel::STATUS_LOADING);
1681 else 1687 else
(...skipping 19 matching lines...) Expand all
1701 if (index == -1) 1707 if (index == -1)
1702 continue; 1708 continue;
1703 ash::ShelfItem item = model_->items()[index]; 1709 ash::ShelfItem item = model_->items()[index];
1704 item.image = image; 1710 item.image = image;
1705 if (arc_deferred_launcher_) 1711 if (arc_deferred_launcher_)
1706 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); 1712 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image);
1707 model_->Set(index, item); 1713 model_->Set(index, item);
1708 // It's possible we're waiting on more than one item, so don't break. 1714 // It's possible we're waiting on more than one item, so don't break.
1709 } 1715 }
1710 } 1716 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698