| 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_H_ | 5 #ifndef ASH_WM_WORKSPACE_H_ |
| 6 #define ASH_WM_WORKSPACE_H_ | 6 #define ASH_WM_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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // Return true if this workspace has |window|. | 60 // Return true if this workspace has |window|. |
| 61 bool Contains(aura::Window* window) const; | 61 bool Contains(aura::Window* window) const; |
| 62 | 62 |
| 63 // Activates this workspace. | 63 // Activates this workspace. |
| 64 void Activate(); | 64 void Activate(); |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 // Sets the bounds of the specified window. | 67 // Sets the bounds of the specified window. |
| 68 void SetWindowBounds(aura::Window* window, const gfx::Rect& bounds); | 68 void SetWindowBounds(aura::Window* window, const gfx::Rect& bounds); |
| 69 | 69 |
| 70 // Sets the ignore window. See WorkspaceManager::set_ignored_window() for |
| 71 // details. |
| 72 void SetIgnoredWindow(aura::Window* window); |
| 73 |
| 70 // Returns true if the given |window| can be added to this workspace. | 74 // Returns true if the given |window| can be added to this workspace. |
| 71 virtual bool CanAdd(aura::Window* window) const = 0; | 75 virtual bool CanAdd(aura::Window* window) const = 0; |
| 72 | 76 |
| 73 // Invoked from AddWindowAfter(). | 77 // Invoked from AddWindowAfter(). |
| 74 virtual void OnWindowAddedAfter(aura::Window* window, | 78 virtual void OnWindowAddedAfter(aura::Window* window, |
| 75 aura::Window* after) = 0; | 79 aura::Window* after) = 0; |
| 76 | 80 |
| 77 // Invoked from RemoveWindow(). | 81 // Invoked from RemoveWindow(). |
| 78 virtual void OnWindowRemoved(aura::Window* window) = 0; | 82 virtual void OnWindowRemoved(aura::Window* window) = 0; |
| 79 | 83 |
| 80 private: | 84 private: |
| 81 const Type type_; | 85 const Type type_; |
| 82 | 86 |
| 83 WorkspaceManager* workspace_manager_; | 87 WorkspaceManager* workspace_manager_; |
| 84 | 88 |
| 85 // Windows in the workspace in layout order. | 89 // Windows in the workspace in layout order. |
| 86 std::vector<aura::Window*> windows_; | 90 std::vector<aura::Window*> windows_; |
| 87 | 91 |
| 88 DISALLOW_COPY_AND_ASSIGN(Workspace); | 92 DISALLOW_COPY_AND_ASSIGN(Workspace); |
| 89 }; | 93 }; |
| 90 | 94 |
| 91 typedef std::vector<Workspace*> Workspaces; | 95 typedef std::vector<Workspace*> Workspaces; |
| 92 | 96 |
| 93 } // namespace internal | 97 } // namespace internal |
| 94 } // namespace ash | 98 } // namespace ash |
| 95 | 99 |
| 96 #endif // ASH_WM_WORKSPACE_H_ | 100 #endif // ASH_WM_WORKSPACE_H_ |
| OLD | NEW |