| OLD | NEW |
| 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_MUS_SHELF_DELEGATE_MUS_H_ | 5 #ifndef ASH_MUS_SHELF_DELEGATE_MUS_H_ |
| 6 #define ASH_MUS_SHELF_DELEGATE_MUS_H_ | 6 #define ASH_MUS_SHELF_DELEGATE_MUS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/shelf/shelf_delegate.h" | 10 #include "ash/shelf/shelf_delegate.h" |
| 11 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" | 11 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" |
| 12 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" |
| 13 | 13 |
| 14 namespace ash { | 14 namespace ash { |
| 15 | 15 |
| 16 class ShelfModel; | 16 class ShelfModel; |
| 17 | 17 |
| 18 namespace sysui { | 18 namespace sysui { |
| 19 | 19 |
| 20 class ShelfDelegateMus : public ShelfDelegate, | 20 class ShelfDelegateMus : public ShelfDelegate, |
| 21 public mash::wm::mojom::UserWindowObserver { | 21 public mash::wm::mojom::UserWindowObserver { |
| 22 public: | 22 public: |
| 23 explicit ShelfDelegateMus(ShelfModel* model); | 23 explicit ShelfDelegateMus(ShelfModel* model); |
| 24 ~ShelfDelegateMus() override; | 24 ~ShelfDelegateMus() override; |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 // ShelfDelegate: | 27 // ShelfDelegate: |
| 28 void OnShelfCreated(Shelf* shelf) override; | 28 void OnShelfCreated(Shelf* shelf) override; |
| 29 void OnShelfDestroyed(Shelf* shelf) override; | 29 void OnShelfDestroyed(Shelf* shelf) override; |
| 30 void OnShelfAlignmentChanged(Shelf* shelf) override; |
| 31 void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override; |
| 30 ShelfID GetShelfIDForAppID(const std::string& app_id) override; | 32 ShelfID GetShelfIDForAppID(const std::string& app_id) override; |
| 31 bool HasShelfIDToAppIDMapping(ShelfID id) const override; | 33 bool HasShelfIDToAppIDMapping(ShelfID id) const override; |
| 32 const std::string& GetAppIDForShelfID(ShelfID id) override; | 34 const std::string& GetAppIDForShelfID(ShelfID id) override; |
| 33 void PinAppWithID(const std::string& app_id) override; | 35 void PinAppWithID(const std::string& app_id) override; |
| 34 bool IsAppPinned(const std::string& app_id) override; | 36 bool IsAppPinned(const std::string& app_id) override; |
| 35 void UnpinAppWithID(const std::string& app_id) override; | 37 void UnpinAppWithID(const std::string& app_id) override; |
| 36 | 38 |
| 37 // mash::wm::mojom::UserWindowObserver: | 39 // mash::wm::mojom::UserWindowObserver: |
| 38 void OnUserWindowObserverAdded( | 40 void OnUserWindowObserverAdded( |
| 39 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; | 41 mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 51 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; | 53 mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_; |
| 52 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; | 54 std::map<uint32_t, ShelfID> window_id_to_shelf_id_; |
| 53 | 55 |
| 54 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); | 56 DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace sysui | 59 } // namespace sysui |
| 58 } // namespace ash | 60 } // namespace ash |
| 59 | 61 |
| 60 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ | 62 #endif // ASH_MUS_SHELF_DELEGATE_MUS_H_ |
| OLD | NEW |