Commit 283c8504 authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

system: Fix DCHECK hit when adding new display with stylus tools.

We try to update visibility in constructor which then checks for widget
in GetEffectiveVisibility. The initialize local state code looks like it
can be done after the shelf pod is added to a widget so move it there.

Test: manual
Change-Id: Ic7c2e7856ed76dce9008a6ad9f9c735ce1a05d81
Fixed: 1115191
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349403Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796975}
parent 4ee98e55
......@@ -187,8 +187,6 @@ PaletteTray::PaletteTray(Shelf* shelf)
tray_container()->AddChildView(icon_);
Shell::Get()->AddShellObserver(this);
InitializeWithLocalState();
}
PaletteTray::~PaletteTray() {
......@@ -431,6 +429,8 @@ void PaletteTray::AnchorUpdated() {
void PaletteTray::Initialize() {
TrayBackgroundView::Initialize();
ui::DeviceDataManager::GetInstance()->AddObserver(this);
InitializeWithLocalState();
}
bool PaletteTray::PerformAction(const ui::Event& event) {
......
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