Commit b146eedf authored by David Black's avatar David Black Committed by Commit Bot

Fix HoldingSpaceTrayIcon size.

Currently HoldingSpaceTrayIcon is updating preferred size when shelf
alignment changes. This is desired behavior when the content forward
entry point is enabled, but this is *not* desired behavior when the
content forward entry point is disabled.

Bug: 1142572
Change-Id: I6ae728cf9968af87934d694a51b293ae64e7e8ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2520380Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: David Black <dmblack@google.com>
Cr-Commit-Position: refs/heads/master@{#824312}
parent 7139be2f
......@@ -25,10 +25,10 @@ namespace ash {
HoldingSpaceTrayIcon::HoldingSpaceTrayIcon(Shelf* shelf) : shelf_(shelf) {
InitLayout();
if (features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled())
if (features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled()) {
controller_observer_.Add(HoldingSpaceController::Get());
shell_observer_.Add(Shell::Get());
shell_observer_.Add(Shell::Get());
}
}
HoldingSpaceTrayIcon::~HoldingSpaceTrayIcon() = default;
......@@ -142,6 +142,8 @@ void HoldingSpaceTrayIcon::OnHoldingSpaceItemFinalized(
void HoldingSpaceTrayIcon::OnShelfAlignmentChanged(
aura::Window* root_window,
ShelfAlignment old_alignment) {
DCHECK(features::IsTemporaryHoldingSpaceContentForwardEntryPointEnabled());
removed_icon_items_.clear();
for (const auto& icon_item : icon_items_)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment