| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Returns the bounds in which a window can be moved/resized. | 56 // Returns the bounds in which a window can be moved/resized. |
| 57 gfx::Rect GetDragAreaBounds(); | 57 gfx::Rect GetDragAreaBounds(); |
| 58 | 58 |
| 59 // Turn on/off overview mode. | 59 // Turn on/off overview mode. |
| 60 void SetOverview(bool overview); | 60 void SetOverview(bool overview); |
| 61 bool is_overview() const { return is_overview_; } | 61 bool is_overview() const { return is_overview_; } |
| 62 | 62 |
| 63 // Sets the size of a single workspace (all workspaces have the same size). | 63 // Sets the size of a single workspace (all workspaces have the same size). |
| 64 void SetWorkspaceSize(const gfx::Size& workspace_size); | 64 void SetWorkspaceSize(const gfx::Size& workspace_size); |
| 65 | 65 |
| 66 // Called when screen work area insets changes. | 66 // Called when monitor's work area insets changes. |
| 67 void OnScreenWorkAreaInsetsChanged(); | 67 void OnMonitorWorkAreaInsetsChanged(); |
| 68 | 68 |
| 69 // Returns the window the layout manager should allow the size to be set for. | 69 // Returns the window the layout manager should allow the size to be set for. |
| 70 // TODO: maybe this should be set on WorkspaceLayoutManager. | 70 // TODO: maybe this should be set on WorkspaceLayoutManager. |
| 71 aura::Window* ignored_window() { return ignored_window_; } | 71 aura::Window* ignored_window() { return ignored_window_; } |
| 72 | 72 |
| 73 // Sets the size of the grid. Newly added windows are forced to align to the | 73 // Sets the size of the grid. Newly added windows are forced to align to the |
| 74 // size of the grid. | 74 // size of the grid. |
| 75 void set_grid_size(int size) { grid_size_ = size; } | 75 void set_grid_size(int size) { grid_size_ = size; } |
| 76 int grid_size() const { return grid_size_; } | 76 int grid_size() const { return grid_size_; } |
| 77 | 77 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Returns the active workspace. | 116 // Returns the active workspace. |
| 117 Workspace* GetActiveWorkspace() const; | 117 Workspace* GetActiveWorkspace() const; |
| 118 | 118 |
| 119 // Returns the workspace that contanis the |window|. | 119 // Returns the workspace that contanis the |window|. |
| 120 Workspace* FindBy(aura::Window* window) const; | 120 Workspace* FindBy(aura::Window* window) const; |
| 121 | 121 |
| 122 // Sets the active workspace. | 122 // Sets the active workspace. |
| 123 void SetActiveWorkspace(Workspace* workspace); | 123 void SetActiveWorkspace(Workspace* workspace); |
| 124 | 124 |
| 125 // Returns the bounds of the work area. | 125 // Returns the bounds of the work area. |
| 126 gfx::Rect GetWorkAreaBounds(); | 126 gfx::Rect GetWorkAreaBounds() const; |
| 127 | 127 |
| 128 // Returns the index of the workspace that contains the |window|. | 128 // Returns the index of the workspace that contains the |window|. |
| 129 int GetWorkspaceIndexContaining(aura::Window* window) const; | 129 int GetWorkspaceIndexContaining(aura::Window* window) const; |
| 130 | 130 |
| 131 // Sets the bounds of |window|. This sets |ignored_window_| to |window| so | 131 // Sets the bounds of |window|. This sets |ignored_window_| to |window| so |
| 132 // that the bounds change is allowed through. | 132 // that the bounds change is allowed through. |
| 133 void SetWindowBounds(aura::Window* window, const gfx::Rect& bounds); | 133 void SetWindowBounds(aura::Window* window, const gfx::Rect& bounds); |
| 134 | 134 |
| 135 // Sets the bounds of all workspaces. | 135 // Sets the bounds of all workspaces. |
| 136 void SetWorkspaceBounds(); | 136 void SetWorkspaceBounds(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 167 // Owned by the Shell container window LauncherContainer. May be NULL. | 167 // Owned by the Shell container window LauncherContainer. May be NULL. |
| 168 ShelfLayoutManager* shelf_; | 168 ShelfLayoutManager* shelf_; |
| 169 | 169 |
| 170 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); | 170 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager); |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 } // namespace internal | 173 } // namespace internal |
| 174 } // namespace ash | 174 } // namespace ash |
| 175 | 175 |
| 176 #endif // ASH_WM_WORKSPACE_MANAGER_H_ | 176 #endif // ASH_WM_WORKSPACE_MANAGER_H_ |
| OLD | NEW |