Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Side by Side Diff: mash/wm/shelf_layout.h

Issue 1835403002: Support additional mash shelf alignments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SHELF_LAYOUT_H_
6 #define MASH_WM_SHELF_LAYOUT_H_ 6 #define MASH_WM_SHELF_LAYOUT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "mash/wm/layout_manager.h" 9 #include "mash/wm/layout_manager.h"
10 #include "mash/wm/public/interfaces/shelf_layout.mojom.h"
10 11
11 namespace mash { 12 namespace mash {
12 namespace wm { 13 namespace wm {
13 14
14 // Lays out the shelf within shelf containers. 15 // Lays out the shelf within shelf containers.
15 class ShelfLayout : public LayoutManager { 16 class ShelfLayout : public LayoutManager, public mojom::ShelfLayout {
16 public: 17 public:
17 explicit ShelfLayout(mus::Window* owner); 18 explicit ShelfLayout(mus::Window* owner);
18 ~ShelfLayout() override; 19 ~ShelfLayout() override;
19 20
20 private: 21 private:
21 // Overridden from LayoutManager: 22 // Overridden from LayoutManager:
22 void LayoutWindow(mus::Window* window) override; 23 void LayoutWindow(mus::Window* window) override;
23 24
25 // Overridden from mojom::ShelfLayout:
26 void SetAlignment(mojom::ShelfAlignment alignment) override;
27 void SetAutoHideBehavior(mojom::ShelfAutoHideBehavior auto_hide) override;
28
29 mojom::ShelfAlignment alignment_;
30 mojom::ShelfAutoHideBehavior auto_hide_behavior_;
31
24 DISALLOW_COPY_AND_ASSIGN(ShelfLayout); 32 DISALLOW_COPY_AND_ASSIGN(ShelfLayout);
25 }; 33 };
26 34
27 } // namespace wm 35 } // namespace wm
28 } // namespace mash 36 } // namespace mash
29 37
30 #endif // MASH_WM_SHELF_LAYOUT_H_ 38 #endif // MASH_WM_SHELF_LAYOUT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698