Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1455)

Unified Diff: ash/common/system/chromeos/palette/palette_tray.h

Issue 2234203002: Auto open and close the palette on an eject event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tool-note
Patch Set: Initial upload Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..46b8932a8de47bf7c2f6d77b21fe039ece5cd4d4 100644
--- a/ash/common/system/chromeos/palette/palette_tray.h
+++ b/ash/common/system/chromeos/palette/palette_tray.h
@@ -22,6 +22,7 @@ class Widget;
namespace ash {
+class EjectController;
class TrayBubbleWrapper;
class PaletteToolManager;
@@ -82,12 +83,18 @@ class ASH_EXPORT PaletteTray : public TrayBackgroundView,
// Sets the icon to visible if the palette can be used.
void UpdateIconVisibility();
+ // Called when a pointer eject event is received. If |ejected| is true, the
+ // pointer was removed. If false, the pointer was inserted.
+ void OnEject(bool ejected);
+
bool OpenBubble();
void AddToolsToView(views::View* host);
std::unique_ptr<PaletteToolManager> palette_tool_manager_;
std::unique_ptr<TrayBubbleWrapper> bubble_;
+ std::unique_ptr<EjectController> eject_controller_;
+
// Weak pointer, will be parented by TrayContainer for its lifetime.
views::ImageView* icon_;

Powered by Google App Engine
This is Rietveld 408576698