Chromium Code Reviews| Index: ash/common/system/chromeos/palette/palette_tray.h |
| diff --git a/ash/common/system/chromeos/palette/palette_tray.h b/ash/common/system/chromeos/palette/palette_tray.h |
| index 18d900ab1bc31f3f6a8337343b9d0a6aa7f2578b..58f488a625b2b3d8e47c3284e50392ac545fce1d 100644 |
| --- a/ash/common/system/chromeos/palette/palette_tray.h |
| +++ b/ash/common/system/chromeos/palette/palette_tray.h |
| @@ -9,11 +9,13 @@ |
| #include <memory> |
| #include "ash/ash_export.h" |
| +#include "ash/common/palette_delegate.h" |
| #include "ash/common/session/session_state_observer.h" |
| #include "ash/common/shell_observer.h" |
| #include "ash/common/system/chromeos/palette/palette_tool_manager.h" |
| #include "ash/common/system/tray/tray_background_view.h" |
| #include "base/macros.h" |
| +#include "base/memory/weak_ptr.h" |
| namespace views { |
| class ImageView; |
| @@ -82,15 +84,24 @@ class ASH_EXPORT PaletteTray : public TrayBackgroundView, |
| // Sets the icon to visible if the palette can be used. |
| void UpdateIconVisibility(); |
| + // Called when the palette enabled pref has changed. |
| + void OnPaletteEnabledPrefChanged(bool enabled); |
| + |
| bool OpenBubble(); |
| void AddToolsToView(views::View* host); |
| std::unique_ptr<PaletteToolManager> palette_tool_manager_; |
| std::unique_ptr<TrayBubbleWrapper> bubble_; |
| + // Manages the callback OnPaletteEnabledPrefChanged callback registered to |
| + // the PaletteDelegate instance. |
| + std::unique_ptr<PaletteDelegate::EnableListenerSubscription> palette_enabled_; |
|
stevenjb
2016/08/23 17:36:41
This is a confusing variable name, I would use pal
jdufault
2016/08/23 22:49:56
Done.
|
| + |
| // Weak pointer, will be parented by TrayContainer for its lifetime. |
| views::ImageView* icon_; |
| + base::WeakPtrFactory<PaletteTray> weak_factory_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PaletteTray); |
| }; |