Index: ash/common/system/chromeos/palette/palette_tray.cc |
diff --git a/ash/common/system/chromeos/palette/palette_tray.cc b/ash/common/system/chromeos/palette/palette_tray.cc |
index 2cfc5b8af776a8d412eed64d2739ccf4990423d4..179be69fd967c0b5e0bbcde240bccb65415f2f16 100644 |
--- a/ash/common/system/chromeos/palette/palette_tray.cc |
+++ b/ash/common/system/chromeos/palette/palette_tray.cc |
@@ -204,13 +204,6 @@ PaletteTray::PaletteTray(WmShelf* wm_shelf) |
base::Bind(&PaletteTray::OnStylusStateChanged, |
weak_factory_.GetWeakPtr())); |
} |
- |
- // OnPaletteEnabledPrefChanged will get called with the initial pref value, |
- // which will take care of showing the palette. |
- palette_enabled_subscription_ = |
- WmShell::Get()->palette_delegate()->AddPaletteEnableListener( |
- base::Bind(&PaletteTray::OnPaletteEnabledPrefChanged, |
- weak_factory_.GetWeakPtr())); |
} |
PaletteTray::~PaletteTray() { |
@@ -413,6 +406,15 @@ void PaletteTray::AnchorUpdated() { |
bubble_->bubble_view()->UpdateBubble(); |
} |
+void PaletteTray::Initialize() { |
+ // OnPaletteEnabledPrefChanged will get called with the initial pref value, |
+ // which will take care of showing the palette. |
+ palette_enabled_subscription_ = |
+ WmShell::Get()->palette_delegate()->AddPaletteEnableListener( |
+ base::Bind(&PaletteTray::OnPaletteEnabledPrefChanged, |
+ weak_factory_.GetWeakPtr())); |
+} |
+ |
void PaletteTray::SetIconBorderForShelfAlignment() { |
// TODO(tdanderson): Ensure PaletteTray follows material design specs. See |
// crbug.com/630464. |