| 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_H_ | 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_H_ |
| 6 #define ASH_WM_WORKSPACE_WORKSPACE_H_ | 6 #define ASH_WM_WORKSPACE_WORKSPACE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 WorkspaceLayoutManager* workspace_layout_manager() { | 49 WorkspaceLayoutManager* workspace_layout_manager() { |
| 50 return workspace_layout_manager_; | 50 return workspace_layout_manager_; |
| 51 } | 51 } |
| 52 | 52 |
| 53 const WorkspaceManager* workspace_manager() const { | 53 const WorkspaceManager* workspace_manager() const { |
| 54 return workspace_manager_; | 54 return workspace_manager_; |
| 55 } | 55 } |
| 56 WorkspaceManager* workspace_manager() { return workspace_manager_; } | 56 WorkspaceManager* workspace_manager() { return workspace_manager_; } |
| 57 | 57 |
| 58 // Returns true if the Workspace should be moved to pending. This is true | 58 // Returns the active window if the active window is in this workspace. |
| 59 // Otherwise, NULL is returned. |
| 60 aura::Window* GetActiveWindow() const; |
| 61 |
| 62 // Returns true if the Workspace should be moved to hidden. This is true |
| 59 // if there are no visible maximized windows. | 63 // if there are no visible maximized windows. |
| 60 bool ShouldMoveToPending() const; | 64 bool ShouldMoveToHidden() const; |
| 61 | 65 |
| 62 // Returns the number of maximized windows (including minimized windows that | 66 // Returns the number of maximized windows (including minimized windows that |
| 63 // would be maximized on restore). This does not consider visibility. | 67 // would be maximized on restore). This does not consider visibility. |
| 64 int GetNumMaximizedWindows() const; | 68 int GetNumMaximizedWindows() const; |
| 65 | 69 |
| 66 private: | 70 private: |
| 67 // Is this a workspace for maximized windows? | 71 // Is this a workspace for maximized windows? |
| 68 const bool is_maximized_; | 72 const bool is_maximized_; |
| 69 | 73 |
| 70 WorkspaceManager* workspace_manager_; | 74 WorkspaceManager* workspace_manager_; |
| 71 | 75 |
| 72 // Our Window, owned by |parent| passed to the constructor. | 76 // Our Window, owned by |parent| passed to the constructor. |
| 73 aura::Window* window_; | 77 aura::Window* window_; |
| 74 | 78 |
| 75 scoped_ptr<WorkspaceEventHandler> event_handler_; | 79 scoped_ptr<WorkspaceEventHandler> event_handler_; |
| 76 | 80 |
| 77 WorkspaceLayoutManager* workspace_layout_manager_; | 81 WorkspaceLayoutManager* workspace_layout_manager_; |
| 78 | 82 |
| 79 DISALLOW_COPY_AND_ASSIGN(Workspace); | 83 DISALLOW_COPY_AND_ASSIGN(Workspace); |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 } // namespace internal | 86 } // namespace internal |
| 83 } // namespace ash | 87 } // namespace ash |
| 84 | 88 |
| 85 #endif // ASH_WM_WORKSPACE_WORKSPACE_H_ | 89 #endif // ASH_WM_WORKSPACE_WORKSPACE_H_ |
| OLD | NEW |