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_MANAGER_H_ | 5 #ifndef ASH_WM_WORKSPACE_MANAGER_H_ |
6 #define ASH_WM_WORKSPACE_MANAGER_H_ | 6 #define ASH_WM_WORKSPACE_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 // Returns the window the layout manager should allow the size to be set for. | 79 // Returns the window the layout manager should allow the size to be set for. |
80 // TODO: maybe this should be set on WorkspaceLayoutManager. | 80 // TODO: maybe this should be set on WorkspaceLayoutManager. |
81 aura::Window* ignored_window() { return ignored_window_; } | 81 aura::Window* ignored_window() { return ignored_window_; } |
82 | 82 |
83 // Sets the size of the grid. Newly added windows are forced to align to the | 83 // Sets the size of the grid. Newly added windows are forced to align to the |
84 // size of the grid. | 84 // size of the grid. |
85 void set_grid_size(int size) { grid_size_ = size; } | 85 void set_grid_size(int size) { grid_size_ = size; } |
86 int grid_size() const { return grid_size_; } | 86 int grid_size() const { return grid_size_; } |
87 | 87 |
88 // Returns a bounds aligned to the grid. Returns |bounds| if grid_size is 0. | |
89 gfx::Rect AlignBoundsToGrid(const gfx::Rect& bounds); | |
90 | |
91 void set_shelf(ShelfLayoutManager* shelf) { shelf_ = shelf; } | 88 void set_shelf(ShelfLayoutManager* shelf) { shelf_ = shelf; } |
92 | 89 |
93 // Updates the visibility and whether any windows overlap the shelf. | 90 // Updates the visibility and whether any windows overlap the shelf. |
94 void UpdateShelfVisibility(); | 91 void UpdateShelfVisibility(); |
95 | 92 |
96 // Returns the current window state. | 93 // Returns the current window state. |
97 WindowState GetWindowState(); | 94 WindowState GetWindowState(); |
98 | 95 |
99 // Invoked when the show state of the specified window changes. | 96 // Invoked when the show state of the specified window changes. |
100 void ShowStateChanged(aura::Window* window); | 97 void ShowStateChanged(aura::Window* window); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // Owned by the Shell container window LauncherContainer. May be NULL. | 171 // Owned by the Shell container window LauncherContainer. May be NULL. |
175 ShelfLayoutManager* shelf_; | 172 ShelfLayoutManager* shelf_; |
176 | 173 |
177 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); | 174 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); |
178 }; | 175 }; |
179 | 176 |
180 } // namespace internal | 177 } // namespace internal |
181 } // namespace ash | 178 } // namespace ash |
182 | 179 |
183 #endif // ASH_WM_WORKSPACE_MANAGER_H_ | 180 #endif // ASH_WM_WORKSPACE_MANAGER_H_ |
OLD | NEW |