Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: ash/wm/workspace/workspace2.h

Issue 10830365: Initial crack at new workspace behavior. Each workspace now has its (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace2.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_WM_WORKSPACE_WORKSPACE2_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_H_
7
8 #include <vector>
9
10 #include "ash/ash_export.h"
11 #include "base/basictypes.h"
12
13 namespace aura {
14 class Window;
15 }
16
17 namespace gfx {
18 class Rect;
19 }
20
21 namespace ash {
22 namespace internal {
23
24 class WorkspaceEventFilter;
25 class WorkspaceManager2;
26
27 // Workspace is used to maintain either a single maximized windows (including
28 // transients and other windows) or any number of windows (for the
29 // desktop). Workspace is used by WorkspaceManager to manage a set of windows.
30 class ASH_EXPORT Workspace2 {
31 public:
32 Workspace2(WorkspaceManager2* manager,
33 aura::Window* parent,
34 bool is_maximized);
35 ~Workspace2();
36
37 // Resets state. This should be used before destroying the Workspace.
38 aura::Window* ReleaseWindow();
39
40 bool is_maximized() const { return is_maximized_; }
41
42 aura::Window* window() { return window_; }
43
44 WorkspaceManager2* workspace_manager() { return workspace_manager_; }
45
46 void SetGridSize(int grid_size);
47
48 // Returns true if the Workspace should be moved to pending. This is true
49 // if there are no visible maximized windows.
50 bool ShouldMoveToPending() const;
51
52 // Returns the number of maximized windows (including minimized windows that
53 // would be maximized on restore). This does not consider visibility.
54 int GetNumMaximizedWindows() const;
55
56 private:
57 // Is this a workspace for maximized windows?
58 const bool is_maximized_;
59
60 WorkspaceManager2* workspace_manager_;
61
62 // Our Window, owned by |parent| passed to the constructor.
63 aura::Window* window_;
64
65 // Owned by |window_|.
66 WorkspaceEventFilter* event_filter_;
67
68 DISALLOW_COPY_AND_ASSIGN(Workspace2);
69 };
70
71 } // namespace internal
72 } // namespace ash
73
74 #endif // ASH_WM_WORKSPACE_WORKSPACE2_H_
OLDNEW
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698