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

Unified Diff: ash/common/palette_delegate.h

Issue 2258553004: Add pref to enable/disable palette tray. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Rebase 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/session/session_state_observer.cc » ('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 67fda37febd5e60a1b6c097fdca2d30e627a3a38..6daf59e8e4ea2c16a88a8a8a3774f1647f335098 100644
--- a/ash/common/palette_delegate.h
+++ b/ash/common/palette_delegate.h
@@ -7,6 +7,7 @@
#include "ash/ash_export.h"
#include "base/callback.h"
+#include "base/callback_list.h"
#include "base/macros.h"
#include "ui/events/devices/stylus_state.h"
@@ -16,10 +17,19 @@ namespace ash {
// Chrome-specific actions.
class PaletteDelegate {
public:
+ using EnableListener = base::Callback<void(bool)>;
+ using EnableListenerSubscription =
+ base::CallbackList<void(bool)>::Subscription;
using OnStylusStateChangedCallback = base::Callback<void(ui::StylusState)>;
virtual ~PaletteDelegate() {}
+ // Sets callback function that will receive the current state of the palette
+ // enabled pref. The callback will be invoked once the initial pref value is
+ // available.
+ virtual std::unique_ptr<EnableListenerSubscription> AddPaletteEnableListener(
+ const EnableListener& on_state_changed) = 0;
+
// Create a new note.
virtual void CreateNote() = 0;
« no previous file with comments | « no previous file | ash/common/session/session_state_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698