Chromium Code Reviews| Index: ash/mus/shelf_delegate_mus.h |
| diff --git a/ash/mus/shelf_delegate_mus.h b/ash/mus/shelf_delegate_mus.h |
| index 2c002658e5a604445131499da299ef01846fd9d8..47978647d7d670efa43116f59420229f3f07ed20 100644 |
| --- a/ash/mus/shelf_delegate_mus.h |
| +++ b/ash/mus/shelf_delegate_mus.h |
| @@ -8,8 +8,10 @@ |
| #include <map> |
| #include "ash/shelf/shelf_delegate.h" |
| +#include "mash/shelf/public/interfaces/shelf.mojom.h" |
| #include "mash/wm/public/interfaces/user_window_controller.mojom.h" |
| #include "mojo/public/cpp/bindings/binding.h" |
| +#include "mojo/public/cpp/bindings/interface_ptr_set.h" |
| namespace ash { |
| @@ -18,6 +20,7 @@ class ShelfModel; |
| namespace sysui { |
| class ShelfDelegateMus : public ShelfDelegate, |
| + public mash::shelf::mojom::Shelf, |
|
James Cook
2016/04/06 04:29:52
optional drive-by comment: I find it kind of confu
msw
2016/04/07 20:34:57
ShelfController (or ShelfManager) sgtm, otherwise
|
| public mash::wm::mojom::UserWindowObserver { |
| public: |
| explicit ShelfDelegateMus(ShelfModel* model); |
| @@ -25,10 +28,10 @@ class ShelfDelegateMus : public ShelfDelegate, |
| private: |
| // ShelfDelegate: |
| - void OnShelfCreated(Shelf* shelf) override; |
| - void OnShelfDestroyed(Shelf* shelf) override; |
| - void OnShelfAlignmentChanged(Shelf* shelf) override; |
| - void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override; |
| + void OnShelfCreated(ash::Shelf* shelf) override; |
| + void OnShelfDestroyed(ash::Shelf* shelf) override; |
| + void OnShelfAlignmentChanged(ash::Shelf* shelf) override; |
| + void OnShelfAutoHideBehaviorChanged(ash::Shelf* shelf) override; |
| ShelfID GetShelfIDForAppID(const std::string& app_id) override; |
| bool HasShelfIDToAppIDMapping(ShelfID id) const override; |
| const std::string& GetAppIDForShelfID(ShelfID id) override; |
| @@ -36,6 +39,15 @@ class ShelfDelegateMus : public ShelfDelegate, |
| bool IsAppPinned(const std::string& app_id) override; |
| void UnpinAppWithID(const std::string& app_id) override; |
| + // mash::shelf::mojom::Shelf: |
| + void AddObserver(mash::shelf::mojom::ShelfObserverPtr observer) override; |
| + void SetAlignment(mash::shelf::mojom::Alignment alignment) override; |
| + void SetAutoHideBehavior( |
| + mash::shelf::mojom::AutoHideBehavior auto_hide) override; |
| + void AddItem(mash::shelf::mojom::ShelfItemPtr item, |
| + mash::shelf::mojom::ShelfItemDelegatePtr delegate) override; |
| + void RemoveItem(const mojo::String& id) override; |
| + |
| // mash::wm::mojom::UserWindowObserver: |
| void OnUserWindowObserverAdded( |
| mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; |
| @@ -49,10 +61,14 @@ class ShelfDelegateMus : public ShelfDelegate, |
| ShelfModel* model_; |
| + mojo::InterfacePtrSet<mash::shelf::mojom::ShelfObserver> observers_; |
| + |
| mash::wm::mojom::UserWindowControllerPtr user_window_controller_; |
| mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; |
| std::map<uint32_t, ShelfID> window_id_to_shelf_id_; |
| + std::map<std::string, ShelfID> app_id_to_shelf_id_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); |
| }; |