| 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_H_ | 5 #ifndef MASH_WM_STATUS_LAYOUT_MANAGER_H_ |
| 6 #define MASH_WM_SHELF_LAYOUT_H_ | 6 #define MASH_WM_STATUS_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/wm/layout_manager.h" | 10 #include "mash/wm/layout_manager.h" |
| 10 #include "mash/wm/public/interfaces/shelf_layout.mojom.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 status container, which contains the status area widget and |
| 16 class ShelfLayout : public LayoutManager, public mojom::ShelfLayout { | 16 // notifications. |
| 17 class StatusLayoutManager : public LayoutManager { |
| 17 public: | 18 public: |
| 18 explicit ShelfLayout(mus::Window* owner); | 19 explicit StatusLayoutManager(mus::Window* owner); |
| 19 ~ShelfLayout() override; | 20 ~StatusLayoutManager() override; |
| 21 |
| 22 void SetAlignment(mash::shelf::mojom::Alignment alignment); |
| 23 void SetAutoHideBehavior(mash::shelf::mojom::AutoHideBehavior auto_hide); |
| 20 | 24 |
| 21 private: | 25 private: |
| 22 // Overridden from LayoutManager: | 26 // Overridden from LayoutManager: |
| 23 void LayoutWindow(mus::Window* window) override; | 27 void LayoutWindow(mus::Window* window) override; |
| 24 | 28 |
| 25 // Overridden from mojom::ShelfLayout: | |
| 26 void SetAlignment(mash::shelf::mojom::Alignment alignment) override; | |
| 27 void SetAutoHideBehavior( | |
| 28 mash::shelf::mojom::AutoHideBehavior auto_hide) override; | |
| 29 | |
| 30 mash::shelf::mojom::Alignment alignment_; | 29 mash::shelf::mojom::Alignment alignment_; |
| 31 mash::shelf::mojom::AutoHideBehavior auto_hide_behavior_; | 30 mash::shelf::mojom::AutoHideBehavior auto_hide_behavior_; |
| 32 | 31 |
| 33 DISALLOW_COPY_AND_ASSIGN(ShelfLayout); | 32 DISALLOW_COPY_AND_ASSIGN(StatusLayoutManager); |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 } // namespace wm | 35 } // namespace wm |
| 37 } // namespace mash | 36 } // namespace mash |
| 38 | 37 |
| 39 #endif // MASH_WM_SHELF_LAYOUT_H_ | 38 #endif // MASH_WM_STATUS_LAYOUT_MANAGER_H_ |
| OLD | NEW |