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

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

Issue 11293014: Renames Workspace*2 -> Workspace*. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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/workspace/workspace.cc ('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_WORKSPACE2_H_
7
8 #include <vector>
9
10 #include "ash/ash_export.h"
11 #include "base/basictypes.h"
12 #include "base/memory/scoped_ptr.h"
13
14 namespace aura {
15 class Window;
16 }
17
18 namespace gfx {
19 class Rect;
20 }
21
22 namespace ash {
23 namespace internal {
24
25 class WorkspaceEventHandler;
26 class WorkspaceLayoutManager2;
27 class WorkspaceManager2;
28
29 // Workspace is used to maintain either a single maximized windows (including
30 // transients and other windows) or any number of windows (for the
31 // desktop). Workspace is used by WorkspaceManager to manage a set of windows.
32 class ASH_EXPORT Workspace2 {
33 public:
34 Workspace2(WorkspaceManager2* manager,
35 aura::Window* parent,
36 bool is_maximized);
37 ~Workspace2();
38
39 // Resets state. This should be used before destroying the Workspace.
40 aura::Window* ReleaseWindow();
41
42 bool is_maximized() const { return is_maximized_; }
43
44 aura::Window* window() { return window_; }
45
46 const WorkspaceLayoutManager2* workspace_layout_manager() const {
47 return workspace_layout_manager_;
48 }
49 WorkspaceLayoutManager2* workspace_layout_manager() {
50 return workspace_layout_manager_;
51 }
52
53 const WorkspaceManager2* workspace_manager() const {
54 return workspace_manager_;
55 }
56 WorkspaceManager2* workspace_manager() { return workspace_manager_; }
57
58 // Returns true if the Workspace should be moved to pending. This is true
59 // if there are no visible maximized windows.
60 bool ShouldMoveToPending() const;
61
62 // Returns the number of maximized windows (including minimized windows that
63 // would be maximized on restore). This does not consider visibility.
64 int GetNumMaximizedWindows() const;
65
66 private:
67 // Is this a workspace for maximized windows?
68 const bool is_maximized_;
69
70 WorkspaceManager2* workspace_manager_;
71
72 // Our Window, owned by |parent| passed to the constructor.
73 aura::Window* window_;
74
75 scoped_ptr<WorkspaceEventHandler> event_handler_;
76
77 WorkspaceLayoutManager2* workspace_layout_manager_;
78
79 DISALLOW_COPY_AND_ASSIGN(Workspace2);
80 };
81
82 } // namespace internal
83 } // namespace ash
84
85 #endif // ASH_WM_WORKSPACE_WORKSPACE2_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace.cc ('k') | ash/wm/workspace/workspace2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698