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

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: 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/palette_delegate.h
diff --git a/ash/common/palette_delegate.h b/ash/common/palette_delegate.h
index e167751e27d954113061d0d750b80efac401c833..442d0c2d3c5b566c0d4736f733f3c36c9c8b6870 100644
--- a/ash/common/palette_delegate.h
+++ b/ash/common/palette_delegate.h
@@ -6,6 +6,8 @@
#define ASH_COMMON_PALETTE_DELEGATE_H_
#include "ash/ash_export.h"
+#include "base/callback.h"
+#include "base/callback_list.h"
#include "base/macros.h"
namespace ash {
@@ -14,9 +16,17 @@ namespace ash {
// Chrome-specific actions.
class PaletteDelegate {
public:
+ using EnableListener = base::Callback<void(bool)>;
+ using EnableListenerSubscription =
+ base::CallbackList<void(bool)>::Subscription;
+
virtual ~PaletteDelegate() {}
- // TODO(jdufault): This delegate will be implemented in later CLs.
+ // 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;
private:
DISALLOW_ASSIGN(PaletteDelegate);
« no previous file with comments | « no previous file | ash/common/session/session_state_observer.cc » ('j') | ash/common/system/chromeos/palette/palette_tray.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698