OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/common/wm/wm_layout_manager.h" |
9 #include "base/compiler_specific.h" | |
10 #include "base/macros.h" | 9 #include "base/macros.h" |
11 #include "ui/aura/layout_manager.h" | |
12 | |
13 namespace aura { | |
14 class Window; | |
15 } | |
16 namespace gfx { | |
17 class Rect; | |
18 } | |
19 namespace ui { | |
20 class Layer; | |
21 } | |
22 namespace views { | |
23 class Widget; | |
24 } | |
25 | 10 |
26 namespace ash { | 11 namespace ash { |
| 12 namespace wm { |
27 | 13 |
28 // A layout manager for the root window. | 14 // A layout manager for the root window. |
29 // Resizes all of its immediate children to fill the bounds of the root window. | 15 // Resizes all of its immediate children and their descendants to fill the |
30 class RootWindowLayoutManager : public aura::LayoutManager { | 16 // bounds of the associated window. |
| 17 class RootWindowLayoutManager : public WmLayoutManager { |
31 public: | 18 public: |
32 explicit RootWindowLayoutManager(aura::Window* owner); | 19 explicit RootWindowLayoutManager(WmWindow* owner); |
33 ~RootWindowLayoutManager() override; | 20 ~RootWindowLayoutManager() override; |
34 | 21 |
35 // Overridden from aura::LayoutManager: | 22 // Overridden from aura::LayoutManager: |
36 void OnWindowResized() override; | 23 void OnWindowResized() override; |
37 void OnWindowAddedToLayout(aura::Window* child) override; | 24 void OnWindowAddedToLayout(WmWindow* child) override; |
38 void OnWillRemoveWindowFromLayout(aura::Window* child) override; | 25 void OnWillRemoveWindowFromLayout(WmWindow* child) override; |
39 void OnWindowRemovedFromLayout(aura::Window* child) override; | 26 void OnWindowRemovedFromLayout(WmWindow* child) override; |
40 void OnChildWindowVisibilityChanged(aura::Window* child, | 27 void OnChildWindowVisibilityChanged(WmWindow* child, bool visible) override; |
41 bool visible) override; | 28 void SetChildBounds(WmWindow* child, |
42 void SetChildBounds(aura::Window* child, | |
43 const gfx::Rect& requested_bounds) override; | 29 const gfx::Rect& requested_bounds) override; |
44 | 30 |
45 private: | 31 private: |
46 aura::Window* owner_; | 32 wm::WmWindow* owner_; |
47 | 33 |
48 DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager); | 34 DISALLOW_COPY_AND_ASSIGN(RootWindowLayoutManager); |
49 }; | 35 }; |
50 | 36 |
| 37 } // namespace wm |
51 } // namespace ash | 38 } // namespace ash |
52 | 39 |
53 #endif // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ | 40 #endif // ASH_WM_ROOT_WINDOW_LAYOUT_MANAGER_H_ |
OLD | NEW |