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

Unified Diff: ash/common/palette_delegate.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 | « no previous file | ash/common/system/chromeos/palette/palette_tray.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/palette_delegate.h
diff --git a/ash/common/palette_delegate.h b/ash/common/palette_delegate.h
index 2c0d241ffacd39b093f70446b09ae7c83301dccb..67fda37febd5e60a1b6c097fdca2d30e627a3a38 100644
--- a/ash/common/palette_delegate.h
+++ b/ash/common/palette_delegate.h
@@ -6,7 +6,9 @@
#define ASH_COMMON_PALETTE_DELEGATE_H_
#include "ash/ash_export.h"
+#include "base/callback.h"
#include "base/macros.h"
+#include "ui/events/devices/stylus_state.h"
namespace ash {
@@ -14,6 +16,8 @@ namespace ash {
// Chrome-specific actions.
class PaletteDelegate {
public:
+ using OnStylusStateChangedCallback = base::Callback<void(ui::StylusState)>;
+
virtual ~PaletteDelegate() {}
// Create a new note.
@@ -25,6 +29,14 @@ class PaletteDelegate {
// Enables or disables the partial magnifier.
virtual void SetPartialMagnifierState(bool enabled) = 0;
+ // Set callback that is run when a stylus is inserted or removed.
+ virtual void SetStylusStateChangedCallback(
+ const OnStylusStateChangedCallback& on_stylus_state_changed) = 0;
+
+ // Returns true if the palette should be automatically opened on an eject
+ // event.
+ virtual bool ShouldAutoOpenPalette() = 0;
+
// Take a screenshot of the entire window.
virtual void TakeScreenshot() = 0;
« no previous file with comments | « no previous file | ash/common/system/chromeos/palette/palette_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698