Commit efe37bc2 authored by Andrew Xu's avatar Andrew Xu Committed by Commit Bot

Fix the issue that shelf is not usable when disabling scrollable shelf

It is a regression issue introduced by the CL on Hotseat. When the
flag is disabled, the init of DelegateView returns early then it fails
to set the layout manager.

Bug: 1009609
Change-Id: Id53ee51556e10d60985abcabbbcba186d5afcc01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838472Reviewed-by: default avatarAndrew Xu <andrewxu@chromium.org>
Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
Commit-Queue: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#702559}
parent 5311e6c3
......@@ -85,12 +85,13 @@ HotseatWidget::DelegateView::~DelegateView() {
void HotseatWidget::DelegateView::Init(
ScrollableShelfView* scrollable_shelf_view,
ui::Layer* parent_layer) {
SetLayoutManager(std::make_unique<views::FillLayout>());
if (!chromeos::switches::ShouldShowScrollableShelf())
return;
if (wallpaper_controller_)
wallpaper_controller_->AddObserver(this);
SetLayoutManager(std::make_unique<views::FillLayout>());
SetParentLayer(parent_layer);
DCHECK(scrollable_shelf_view);
......
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