| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MASH_WM_SHELF_LAYOUT_MANAGER_H_ | |
| 6 #define MASH_WM_SHELF_LAYOUT_MANAGER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "mash/shelf/public/interfaces/shelf_constants.mojom.h" | |
| 10 #include "mash/wm/layout_manager.h" | |
| 11 | |
| 12 namespace mash { | |
| 13 namespace wm { | |
| 14 | |
| 15 class ShelfLayoutManagerDelegate; | |
| 16 | |
| 17 // Lays out the shelf within shelf containers. | |
| 18 class ShelfLayoutManager : public LayoutManager { | |
| 19 public: | |
| 20 ShelfLayoutManager(mus::Window* owner, ShelfLayoutManagerDelegate* delegate); | |
| 21 ~ShelfLayoutManager() override; | |
| 22 | |
| 23 // Returns the shelf, which may be null. | |
| 24 mus::Window* GetShelfWindow(); | |
| 25 | |
| 26 void SetAlignment(shelf::mojom::Alignment alignment); | |
| 27 void SetAutoHideBehavior(shelf::mojom::AutoHideBehavior auto_hide); | |
| 28 | |
| 29 shelf::mojom::Alignment alignment() const { return alignment_; } | |
| 30 shelf::mojom::AutoHideBehavior auto_hide_behavior() const { | |
| 31 return auto_hide_behavior_; | |
| 32 } | |
| 33 | |
| 34 private: | |
| 35 // Overridden from LayoutManager: | |
| 36 void LayoutWindow(mus::Window* window) override; | |
| 37 void WindowAdded(mus::Window* window) override; | |
| 38 | |
| 39 ShelfLayoutManagerDelegate* delegate_; | |
| 40 shelf::mojom::Alignment alignment_; | |
| 41 shelf::mojom::AutoHideBehavior auto_hide_behavior_; | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | |
| 44 }; | |
| 45 | |
| 46 } // namespace wm | |
| 47 } // namespace mash | |
| 48 | |
| 49 #endif // MASH_WM_SHELF_LAYOUT_MANAGER_H_ | |
| OLD | NEW |