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_CONTROLLER_H_ | 5 #ifndef ASH_WM_WORKSPACE_CONTROLLER_H_ |
6 #define ASH_WM_WORKSPACE_CONTROLLER_H_ | 6 #define ASH_WM_WORKSPACE_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/wm/workspace/workspace_types.h" | 9 #include "ash/wm/workspace/workspace_types.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "ui/aura/client/activation_change_observer.h" | 12 #include "ui/aura/client/activation_change_observer.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class Window; | 15 class Window; |
16 } | 16 } |
17 | 17 |
18 namespace ash { | 18 namespace ash { |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 class BaseWorkspaceManager; | 21 class BaseWorkspaceManager; |
22 class ShelfLayoutManager; | 22 class ShelfLayoutManager; |
23 class WorkspaceControllerTestHelper; | 23 class WorkspaceControllerTestHelper; |
24 class WorkspaceEventFilter; | 24 class WorkspaceEventFilter; |
25 class WorkspaceLayoutManager; | 25 class WorkspaceLayoutManager; |
26 | 26 |
27 // WorkspaceController acts as a central place that ties together all the | 27 // WorkspaceController acts as a central place that ties together all the |
28 // various workspace pieces: WorkspaceManager, WorkspaceLayoutManager and | 28 // various workspace pieces. |
29 // WorkspaceEventFilter. | |
30 class ASH_EXPORT WorkspaceController | 29 class ASH_EXPORT WorkspaceController |
31 : public aura::client::ActivationChangeObserver { | 30 : public aura::client::ActivationChangeObserver { |
32 public: | 31 public: |
33 explicit WorkspaceController(aura::Window* viewport); | 32 explicit WorkspaceController(aura::Window* viewport); |
34 virtual ~WorkspaceController(); | 33 virtual ~WorkspaceController(); |
35 | 34 |
36 // Returns true if Workspace2 is enabled. | 35 // Returns true if Workspace2 is enabled. |
37 static bool IsWorkspace2Enabled(); | 36 static bool IsWorkspace2Enabled(); |
38 | 37 |
39 // Returns true if in maximized or fullscreen mode. | 38 // Returns true if in maximized or fullscreen mode. |
40 bool IsInMaximizedMode() const; | 39 bool IsInMaximizedMode() const; |
41 | 40 |
42 // Sets the size of the grid. | |
43 void SetGridSize(int grid_size); | |
44 int GetGridSize() const; | |
45 | |
46 // Returns the current window state. | 41 // Returns the current window state. |
47 WorkspaceWindowState GetWindowState() const; | 42 WorkspaceWindowState GetWindowState() const; |
48 | 43 |
49 void SetShelf(ShelfLayoutManager* shelf); | 44 void SetShelf(ShelfLayoutManager* shelf); |
50 | 45 |
51 // Sets the active workspace based on |window|. | 46 // Sets the active workspace based on |window|. |
52 void SetActiveWorkspaceByWindow(aura::Window* window); | 47 void SetActiveWorkspaceByWindow(aura::Window* window); |
53 | 48 |
54 // See description in BaseWorkspaceManager::GetParentForNewWindow(). | 49 // See description in BaseWorkspaceManager::GetParentForNewWindow(). |
55 aura::Window* GetParentForNewWindow(aura::Window* window); | 50 aura::Window* GetParentForNewWindow(aura::Window* window); |
(...skipping 18 matching lines...) Expand all Loading... |
74 // Owned by |viewport_|. | 69 // Owned by |viewport_|. |
75 WorkspaceEventFilter* event_filter_; | 70 WorkspaceEventFilter* event_filter_; |
76 | 71 |
77 DISALLOW_COPY_AND_ASSIGN(WorkspaceController); | 72 DISALLOW_COPY_AND_ASSIGN(WorkspaceController); |
78 }; | 73 }; |
79 | 74 |
80 } // namespace internal | 75 } // namespace internal |
81 } // namespace ash | 76 } // namespace ash |
82 | 77 |
83 #endif // ASH_WM_WORKSPACE_CONTROLLER_H_ | 78 #endif // ASH_WM_WORKSPACE_CONTROLLER_H_ |
OLD | NEW |