| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 void AdjustWindowSizeForScreenChange(aura::Window* window, | 100 void AdjustWindowSizeForScreenChange(aura::Window* window, |
| 101 AdjustWindowReason reason); | 101 AdjustWindowReason reason); |
| 102 | 102 |
| 103 // Updates the bounds of the window from a show state change. | 103 // Updates the bounds of the window from a show state change. |
| 104 void UpdateBoundsFromShowState(aura::Window* window); | 104 void UpdateBoundsFromShowState(aura::Window* window); |
| 105 | 105 |
| 106 // If |window| is maximized or fullscreen the bounds of the window are set and | 106 // If |window| is maximized or fullscreen the bounds of the window are set and |
| 107 // true is returned. Does nothing otherwise. | 107 // true is returned. Does nothing otherwise. |
| 108 bool SetMaximizedOrFullscreenBounds(aura::Window* window); | 108 bool SetMaximizedOrFullscreenBounds(aura::Window* window); |
| 109 | 109 |
| 110 // Enum for bits that contain edges that a window can be stuck to. |
| 111 // Multiple edges can be combined in a bitmask |
| 112 enum StuckWindowEdges { |
| 113 EDGE_NONE = 0, |
| 114 EDGE_LEFT = 1, |
| 115 EDGE_RIGHT = 2, |
| 116 EDGE_TOP = 4, |
| 117 EDGE_BOTTOM = 8, |
| 118 EDGE_ALL = EDGE_LEFT | EDGE_RIGHT | EDGE_TOP | EDGE_BOTTOM |
| 119 }; |
| 120 |
| 121 // set the bitmask with edges |
| 122 int CalculateStuckEdges(aura::Window* window); |
| 123 |
| 124 // restores stuck state for right or bottom edges |
| 125 gfx::Rect AdjustWindowBoundsForStuckEdges(aura::Window* window, |
| 126 const gfx::Rect& bounds); |
| 127 |
| 110 WorkspaceManager* workspace_manager(); | 128 WorkspaceManager* workspace_manager(); |
| 111 | 129 |
| 112 aura::RootWindow* root_window_; | 130 aura::RootWindow* root_window_; |
| 113 | 131 |
| 114 Workspace* workspace_; | 132 Workspace* workspace_; |
| 115 | 133 |
| 116 // Set of windows we're listening to. | 134 // Set of windows we're listening to. |
| 117 WindowSet windows_; | 135 WindowSet windows_; |
| 118 | 136 |
| 119 // The work area. Cached to avoid unnecessarily moving windows during a | 137 // The work area. Cached to avoid unnecessarily moving windows during a |
| 120 // workspace switch. | 138 // workspace switch. |
| 121 gfx::Rect work_area_; | 139 gfx::Rect work_area_; |
| 122 | 140 |
| 123 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 141 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
| 124 }; | 142 }; |
| 125 | 143 |
| 126 } // namespace internal | 144 } // namespace internal |
| 127 } // namespace ash | 145 } // namespace ash |
| 128 | 146 |
| 129 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 147 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| OLD | NEW |