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_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "ash/shell_observer.h" | 10 #include "ash/shell_observer.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 // Updates the bounds of the window for a show state change from | 81 // Updates the bounds of the window for a show state change from |
82 // |last_show_state|. | 82 // |last_show_state|. |
83 void UpdateBoundsFromShowState(wm::WindowState* window_state, | 83 void UpdateBoundsFromShowState(wm::WindowState* window_state, |
84 ui::WindowShowState last_show_state); | 84 ui::WindowShowState last_show_state); |
85 | 85 |
86 // If |window_state| is maximized or fullscreen the bounds of the | 86 // If |window_state| is maximized or fullscreen the bounds of the |
87 // window are set and true is returned. Does nothing otherwise. | 87 // window are set and true is returned. Does nothing otherwise. |
88 bool SetMaximizedOrFullscreenBounds(wm::WindowState* window_state); | 88 bool SetMaximizedOrFullscreenBounds(wm::WindowState* window_state); |
89 | 89 |
| 90 // Adjusts the |bounds| so that they are flush with the edge of the |
| 91 // workspace if the window represented by |window_state| is side snapped. |
| 92 void AdjustSnappedBounds(wm::WindowState* window_state, gfx::Rect* bounds); |
| 93 |
| 94 // Animates the window bounds to |bounds|. |
| 95 void SetChildBoundsAnimated(aura::Window* child, const gfx::Rect& bounds); |
| 96 |
90 internal::ShelfLayoutManager* shelf_; | 97 internal::ShelfLayoutManager* shelf_; |
91 aura::Window* window_; | 98 aura::Window* window_; |
92 | 99 |
93 // The work area. Cached to avoid unnecessarily moving windows during a | 100 // The work area. Cached to avoid unnecessarily moving windows during a |
94 // workspace switch. | 101 // workspace switch. |
95 gfx::Rect work_area_in_parent_; | 102 gfx::Rect work_area_in_parent_; |
96 | 103 |
97 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 104 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
98 }; | 105 }; |
99 | 106 |
100 } // namespace internal | 107 } // namespace internal |
101 } // namespace ash | 108 } // namespace ash |
102 | 109 |
103 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 110 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
OLD | NEW |