Commit 484b3bce authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS: Delay shelf config init until after app list controller

In the newest shelf redesign, the shelf size changes depending on
whether the user is on the home screen or "in app". To make that work,
we need to have the shelf config observe changes in app list visibility
(from the app list controller). This change makes sure the shelf config
initialization happens after the app list controller is instantiated,
so that the shelf config can add itself as an observer in a future CL.

Bug: 982512
Change-Id: I6889156bf1c5aa06972dbeb304bd468afbadf12e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816819
Auto-Submit: Manu Cornet <manucornet@chromium.org>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#698481}
parent b58d8d43
......@@ -980,7 +980,6 @@ void Shell::Init(
accelerator_controller_ = std::make_unique<AcceleratorControllerImpl>();
shelf_config_ = std::make_unique<ShelfConfig>();
shelf_config_->Init();
shelf_controller_ = std::make_unique<ShelfController>();
magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler();
......@@ -1069,6 +1068,9 @@ void Shell::Init(
app_list_controller_ = std::make_unique<AppListControllerImpl>();
home_screen_controller_->SetDelegate(app_list_controller_.get());
// The |shelf_config_| needs |app_list_controller_| to initialize itself.
shelf_config_->Init();
autoclick_controller_ = std::make_unique<AutoclickController>();
high_contrast_controller_.reset(new HighContrastController);
......
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