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

Unified Diff: ash/common/shelf/shelf_controller.h

Issue 2474653003: PreferencesManager (Closed)
Patch Set: Enforce Observer Removal Created 4 years 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/DEPS ('k') | ash/common/shelf/shelf_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_controller.h
diff --git a/ash/common/shelf/shelf_controller.h b/ash/common/shelf/shelf_controller.h
index b058d4ffbf1b95880e98c55685a3c0f2635077d8..2f91e8547af0e7f477b0254b047baf53c30bb08b 100644
--- a/ash/common/shelf/shelf_controller.h
+++ b/ash/common/shelf/shelf_controller.h
@@ -12,6 +12,7 @@
#include "ash/common/shelf/shelf_model.h"
#include "ash/public/cpp/shelf_types.h"
#include "ash/public/interfaces/shelf.mojom.h"
+#include "components/prefs/pref_store.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/interface_ptr_set.h"
@@ -21,7 +22,8 @@ class WmShelf;
// Ash's implementation of the mojom::ShelfController interface. Chrome connects
// to this interface to observe and manage the per-display ash shelf instances.
-class ShelfController : public mojom::ShelfController {
+class ShelfController : public mojom::ShelfController,
+ public PrefStore::Observer {
public:
ShelfController();
~ShelfController() override;
@@ -54,6 +56,10 @@ class ShelfController : public mojom::ShelfController {
void UnpinItem(const std::string& app_id) override;
void SetItemImage(const std::string& app_id, const SkBitmap& image) override;
+ // PrefStore::Observer:
+ void OnPrefValueChanged(const std::string& key) override;
+ void OnInitializationCompleted(bool succeeded) override;
+
private:
// The shelf model shared by all shelf instances.
ShelfModel model_;
« no previous file with comments | « ash/common/DEPS ('k') | ash/common/shelf/shelf_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698