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

Side by Side Diff: ash/common/shelf/shelf_controller.h

Issue 2474653003: PreferencesManager (Closed)
Patch Set: Ash example Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_COMMON_SHELF_SHELF_CONTROLLER_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_CONTROLLER_H_
6 #define ASH_COMMON_SHELF_SHELF_CONTROLLER_H_ 6 #define ASH_COMMON_SHELF_SHELF_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "ash/common/shelf/shelf_item_types.h" 11 #include "ash/common/shelf/shelf_item_types.h"
12 #include "ash/common/shelf/shelf_model.h" 12 #include "ash/common/shelf/shelf_model.h"
13 #include "ash/public/cpp/shelf_types.h" 13 #include "ash/public/cpp/shelf_types.h"
14 #include "ash/public/interfaces/shelf.mojom.h" 14 #include "ash/public/interfaces/shelf.mojom.h"
15 #include "mojo/public/cpp/bindings/binding_set.h" 15 #include "mojo/public/cpp/bindings/binding_set.h"
16 #include "mojo/public/cpp/bindings/interface_ptr_set.h" 16 #include "mojo/public/cpp/bindings/interface_ptr_set.h"
17 #include "services/preferences/public/cpp/pref_observer_store.h"
17 18
18 namespace ash { 19 namespace ash {
19 20
20 class WmShelf; 21 class WmShelf;
21 22
22 // Ash's implementation of the mojom::ShelfController interface. Chrome connects 23 // Ash's implementation of the mojom::ShelfController interface. Chrome connects
23 // to this interface to observe and manage the per-display ash shelf instances. 24 // to this interface to observe and manage the per-display ash shelf instances.
24 class ShelfController : public mojom::ShelfController { 25 class ShelfController : public mojom::ShelfController {
25 public: 26 public:
26 ShelfController(); 27 ShelfController();
(...skipping 30 matching lines...) Expand all
57 private: 58 private:
58 // The shelf model shared by all shelf instances. 59 // The shelf model shared by all shelf instances.
59 ShelfModel model_; 60 ShelfModel model_;
60 61
61 // Bindings for the ShelfController interface. 62 // Bindings for the ShelfController interface.
62 mojo::BindingSet<mojom::ShelfController> bindings_; 63 mojo::BindingSet<mojom::ShelfController> bindings_;
63 64
64 // The set of shelf observers notified about shelf state and settings changes. 65 // The set of shelf observers notified about shelf state and settings changes.
65 mojo::AssociatedInterfacePtrSet<mojom::ShelfObserver> observers_; 66 mojo::AssociatedInterfacePtrSet<mojom::ShelfObserver> observers_;
66 67
68 scoped_refptr<PrefObserverStore> store_;
69
67 // Mappings between application and shelf ids. 70 // Mappings between application and shelf ids.
68 std::map<std::string, ShelfID> app_id_to_shelf_id_; 71 std::map<std::string, ShelfID> app_id_to_shelf_id_;
69 std::map<ShelfID, std::string> shelf_id_to_app_id_; 72 std::map<ShelfID, std::string> shelf_id_to_app_id_;
70 73
71 DISALLOW_COPY_AND_ASSIGN(ShelfController); 74 DISALLOW_COPY_AND_ASSIGN(ShelfController);
72 }; 75 };
73 76
74 } // namespace ash 77 } // namespace ash
75 78
76 #endif // ASH_COMMON_SHELF_SHELF_CONTROLLER_H_ 79 #endif // ASH_COMMON_SHELF_SHELF_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698