| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 MASH_WM_SHELF_LAYOUT_MANAGER_H_ | 5 #ifndef MASH_WM_SHELF_LAYOUT_MANAGER_H_ |
| 6 #define MASH_WM_SHELF_LAYOUT_MANAGER_H_ | 6 #define MASH_WM_SHELF_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "mash/shelf/public/interfaces/shelf_constants.mojom.h" | 9 #include "mash/shelf/public/interfaces/shelf_constants.mojom.h" |
| 10 #include "mash/wm/layout_manager.h" | 10 #include "mash/wm/layout_manager.h" |
| 11 | 11 |
| 12 namespace mash { | 12 namespace mash { |
| 13 namespace wm { | 13 namespace wm { |
| 14 | 14 |
| 15 // Lays out the shelf within shelf containers. | 15 // Lays out the shelf within shelf containers. |
| 16 class ShelfLayoutManager : public LayoutManager { | 16 class ShelfLayoutManager : public LayoutManager { |
| 17 public: | 17 public: |
| 18 explicit ShelfLayoutManager(mus::Window* owner); | 18 explicit ShelfLayoutManager(mus::Window* owner); |
| 19 ~ShelfLayoutManager() override; | 19 ~ShelfLayoutManager() override; |
| 20 | 20 |
| 21 void SetAlignment(mash::shelf::mojom::Alignment alignment); | 21 // Returns the shelf, which may be null. |
| 22 void SetAutoHideBehavior(mash::shelf::mojom::AutoHideBehavior auto_hide); | 22 mus::Window* GetShelfWindow(); |
| 23 |
| 24 void SetAlignment(shelf::mojom::Alignment alignment); |
| 25 void SetAutoHideBehavior(shelf::mojom::AutoHideBehavior auto_hide); |
| 26 |
| 27 shelf::mojom::Alignment alignment() const { return alignment_; } |
| 28 shelf::mojom::AutoHideBehavior auto_hide_behavior() const { |
| 29 return auto_hide_behavior_; |
| 30 } |
| 23 | 31 |
| 24 private: | 32 private: |
| 25 // Overridden from LayoutManager: | 33 // Overridden from LayoutManager: |
| 26 void LayoutWindow(mus::Window* window) override; | 34 void LayoutWindow(mus::Window* window) override; |
| 27 | 35 |
| 28 mash::shelf::mojom::Alignment alignment_; | 36 shelf::mojom::Alignment alignment_; |
| 29 mash::shelf::mojom::AutoHideBehavior auto_hide_behavior_; | 37 shelf::mojom::AutoHideBehavior auto_hide_behavior_; |
| 30 | 38 |
| 31 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 39 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 32 }; | 40 }; |
| 33 | 41 |
| 34 } // namespace wm | 42 } // namespace wm |
| 35 } // namespace mash | 43 } // namespace mash |
| 36 | 44 |
| 37 #endif // MASH_WM_SHELF_LAYOUT_MANAGER_H_ | 45 #endif // MASH_WM_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |