| 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_WORKSPACE2_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE2_H_ |
| 6 #define ASH_WM_WORKSPACE_WORKSPACE2_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE2_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // Resets state. This should be used before destroying the Workspace. | 37 // Resets state. This should be used before destroying the Workspace. |
| 38 aura::Window* ReleaseWindow(); | 38 aura::Window* ReleaseWindow(); |
| 39 | 39 |
| 40 bool is_maximized() const { return is_maximized_; } | 40 bool is_maximized() const { return is_maximized_; } |
| 41 | 41 |
| 42 aura::Window* window() { return window_; } | 42 aura::Window* window() { return window_; } |
| 43 | 43 |
| 44 WorkspaceManager2* workspace_manager() { return workspace_manager_; } | 44 WorkspaceManager2* workspace_manager() { return workspace_manager_; } |
| 45 | 45 |
| 46 void SetGridSize(int grid_size); | |
| 47 | |
| 48 // Returns true if the Workspace should be moved to pending. This is true | 46 // Returns true if the Workspace should be moved to pending. This is true |
| 49 // if there are no visible maximized windows. | 47 // if there are no visible maximized windows. |
| 50 bool ShouldMoveToPending() const; | 48 bool ShouldMoveToPending() const; |
| 51 | 49 |
| 52 // Returns the number of maximized windows (including minimized windows that | 50 // Returns the number of maximized windows (including minimized windows that |
| 53 // would be maximized on restore). This does not consider visibility. | 51 // would be maximized on restore). This does not consider visibility. |
| 54 int GetNumMaximizedWindows() const; | 52 int GetNumMaximizedWindows() const; |
| 55 | 53 |
| 56 private: | 54 private: |
| 57 // Is this a workspace for maximized windows? | 55 // Is this a workspace for maximized windows? |
| 58 const bool is_maximized_; | 56 const bool is_maximized_; |
| 59 | 57 |
| 60 WorkspaceManager2* workspace_manager_; | 58 WorkspaceManager2* workspace_manager_; |
| 61 | 59 |
| 62 // Our Window, owned by |parent| passed to the constructor. | 60 // Our Window, owned by |parent| passed to the constructor. |
| 63 aura::Window* window_; | 61 aura::Window* window_; |
| 64 | 62 |
| 65 // Owned by |window_|. | 63 // Owned by |window_|. |
| 66 WorkspaceEventFilter* event_filter_; | 64 WorkspaceEventFilter* event_filter_; |
| 67 | 65 |
| 68 DISALLOW_COPY_AND_ASSIGN(Workspace2); | 66 DISALLOW_COPY_AND_ASSIGN(Workspace2); |
| 69 }; | 67 }; |
| 70 | 68 |
| 71 } // namespace internal | 69 } // namespace internal |
| 72 } // namespace ash | 70 } // namespace ash |
| 73 | 71 |
| 74 #endif // ASH_WM_WORKSPACE_WORKSPACE2_H_ | 72 #endif // ASH_WM_WORKSPACE_WORKSPACE2_H_ |
| OLD | NEW |