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

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

Issue 2644713002: cros: Use runtime stylus detection for ash palette. (Closed)
Patch Set: Initial upload Created 3 years, 11 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 7dbc3c0baaf2f78480fba348673f456d0eae52c8..9633c35b729c6ad05b178ce0b9ad0437e777e633 100644
--- a/ash/common/system/chromeos/palette/palette_tray.h
+++ b/ash/common/system/chromeos/palette/palette_tray.h
@@ -16,6 +16,7 @@
#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_event_observer.h"
namespace gfx {
class Point;
@@ -38,6 +39,7 @@ class ASH_EXPORT PaletteTray : public TrayBackgroundView,
public SessionStateObserver,
public ShellObserver,
public PaletteToolManager::Delegate,
+ public ui::InputDeviceEventObserver,
public views::TrayBubbleView::Delegate {
public:
explicit PaletteTray(WmShelf* wm_shelf);
@@ -78,6 +80,10 @@ class ASH_EXPORT PaletteTray : public TrayBackgroundView,
bool ContainsPointInScreen(const gfx::Point& point);
private:
+ // ui::InputDeviceObserver:
+ void OnTouchscreenDeviceConfigurationChanged() override;
+ void OnStylusStateChanged(ui::StylusState stylus_state) override;
stevenjb 2017/01/21 00:23:50 It's a bit odd to have some overrides private and
jdufault 2017/01/25 00:53:15 I think the rationale for making these private is
stevenjb 2017/01/25 01:12:12 Personally I prefer to keep public/private consist
+
// views::TrayBubbleView::Delegate:
void BubbleViewDestroyed() override;
void OnMouseEnteredView() override;
@@ -103,9 +109,6 @@ 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);
-
// Called when the palette enabled pref has changed.
void OnPaletteEnabledPrefChanged(bool enabled);

Powered by Google App Engine
This is Rietveld 408576698