OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 ASH_COMMON_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ | |
6 #define ASH_COMMON_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ | |
7 | |
8 #include "ash/common/wm_layout_manager.h" | |
9 #include "base/macros.h" | |
10 | |
11 namespace ash { | |
12 namespace wm { | |
13 | |
14 // A layout manager for the root window. | |
15 // Resizes all of its immediate children and their descendants to fill the | |
16 // bounds of the associated window. | |
17 class RootWindowLayoutManager : public WmLayoutManager { | |
18 public: | |
19 explicit RootWindowLayoutManager(WmWindow* owner); | |
20 ~RootWindowLayoutManager() override; | |
21 | |
22 // Overridden from aura::LayoutManager: | |
23 void OnWindowResized() override; | |
24 void OnWindowAddedToLayout(WmWindow* child) override; | |
25 void OnWillRemoveWindowFromLayout(WmWindow* child) override; | |
26 void OnWindowRemovedFromLayout(WmWindow* child) override; | |
27 void OnChildWindowVisibilityChanged(WmWindow* child, bool visible) override; | |
28 void SetChildBounds(WmWindow* child, | |
29 const gfx::Rect& requested_bounds) override; | |
30 | |
31 private: | |
32 WmWindow* owner_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager); | |
35 }; | |
36 | |
37 } // namespace wm | |
38 } // namespace ash | |
39 | |
40 #endif // ASH_COMMON_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ | |
OLD | NEW |