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

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: Use weak ptr 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
« no previous file with comments | « ash/common/palette_delegate.h ('k') | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0cb60c1ba38c64e9ca68970bbc619ce27a97825c..2d362d901d84bec2fab7374b1c5c35537e002eef 100644
--- a/ash/common/system/chromeos/palette/palette_tray.h
+++ b/ash/common/system/chromeos/palette/palette_tray.h
@@ -14,6 +14,8 @@
#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"
+#include "ui/events/devices/input_device_manager.h"
namespace views {
class ImageView;
@@ -85,6 +87,9 @@ class ASH_EXPORT PaletteTray : public TrayBackgroundView,
// Sets the icon to visible if the palette can be used.
void UpdateIconVisibility();
+ // Called when a stylus inserted or removed event is received.
+ void OnStylusStateChanged(ui::StylusState stylus_state);
+
bool OpenBubble();
void AddToolsToView(views::View* host);
@@ -94,6 +99,8 @@ class ASH_EXPORT PaletteTray : public TrayBackgroundView,
// Weak pointer, will be parented by TrayContainer for its lifetime.
views::ImageView* icon_;
+ base::WeakPtrFactory<PaletteTray> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(PaletteTray);
};
« no previous file with comments | « ash/common/palette_delegate.h ('k') | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698