| 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..d6607826c935ad7f730887d62e50c41a6e1b6374 100644
|
| --- a/ash/common/shelf/shelf_controller.h
|
| +++ b/ash/common/shelf/shelf_controller.h
|
| @@ -12,8 +12,10 @@
|
| #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"
|
| +#include "services/preferences/public/cpp/pref_observer_store.h"
|
|
|
| namespace ash {
|
|
|
| @@ -21,7 +23,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 +57,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_;
|
| @@ -64,6 +71,8 @@ class ShelfController : public mojom::ShelfController {
|
| // The set of shelf observers notified about shelf state and settings changes.
|
| mojo::AssociatedInterfacePtrSet<mojom::ShelfObserver> observers_;
|
|
|
| + scoped_refptr<PrefObserverStore> store_;
|
| +
|
| // Mappings between application and shelf ids.
|
| std::map<std::string, ShelfID> app_id_to_shelf_id_;
|
| std::map<ShelfID, std::string> shelf_id_to_app_id_;
|
|
|