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

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

Issue 11201002: Removes worskpace 1 code. Will rename next. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove constants and add back kDisableLoginAnimations Created 8 years, 2 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/workspace/workspace_manager.cc ('k') | ash/wm/workspace/workspace_manager2.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MANAGER2_H_ 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_MANAGER2_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_MANAGER2_H_ 6 #define ASH_WM_WORKSPACE_WORKSPACE_MANAGER2_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
13 #include "ash/shell_observer.h" 13 #include "ash/shell_observer.h"
14 #include "ash/wm/workspace/base_workspace_manager.h" 14 #include "ash/wm/workspace/workspace_types.h"
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "base/timer.h" 19 #include "base/timer.h"
20 #include "ui/base/ui_base_types.h" 20 #include "ui/base/ui_base_types.h"
21 21
22 namespace aura { 22 namespace aura {
23 class Window; 23 class Window;
24 } 24 }
(...skipping 19 matching lines...) Expand all
44 class WorkspaceLayoutManager2; 44 class WorkspaceLayoutManager2;
45 class WorkspaceManagerTest2; 45 class WorkspaceManagerTest2;
46 class Workspace2; 46 class Workspace2;
47 47
48 // WorkspaceManager manages multiple workspaces in the desktop. Workspaces are 48 // WorkspaceManager manages multiple workspaces in the desktop. Workspaces are
49 // implicitly created as windows are maximized (or made fullscreen), and 49 // implicitly created as windows are maximized (or made fullscreen), and
50 // destroyed when maximized windows are closed or restored. There is always one 50 // destroyed when maximized windows are closed or restored. There is always one
51 // workspace for the desktop. 51 // workspace for the desktop.
52 // Internally WorkspaceManager2 creates a Window for each Workspace. As windows 52 // Internally WorkspaceManager2 creates a Window for each Workspace. As windows
53 // are maximized and restored they are reparented to the right Window. 53 // are maximized and restored they are reparented to the right Window.
54 class ASH_EXPORT WorkspaceManager2 54 class ASH_EXPORT WorkspaceManager2 : public ash::ShellObserver {
55 : public BaseWorkspaceManager,
56 public ash::ShellObserver {
57 public: 55 public:
58 explicit WorkspaceManager2(aura::Window* viewport); 56 explicit WorkspaceManager2(aura::Window* viewport);
59 virtual ~WorkspaceManager2(); 57 virtual ~WorkspaceManager2();
60 58
61 // Returns true if |window| is considered maximized and should exist in its 59 // Returns true if |window| is considered maximized and should exist in its
62 // own workspace. 60 // own workspace.
63 static bool IsMaximized(aura::Window* window); 61 static bool IsMaximized(aura::Window* window);
64 static bool IsMaximizedState(ui::WindowShowState state); 62 static bool IsMaximizedState(ui::WindowShowState state);
65 63
66 // Returns true if |window| is minimized and will restore to a maximized 64 // Returns true if |window| is minimized and will restore to a maximized
67 // window. 65 // window.
68 static bool WillRestoreMaximized(aura::Window* window); 66 static bool WillRestoreMaximized(aura::Window* window);
69 67
70 // BaseWorkspaceManager overrides: 68 // Returns the current window state.
71 virtual bool IsInMaximizedMode() const OVERRIDE; 69 WorkspaceWindowState GetWindowState() const;
72 virtual WorkspaceWindowState GetWindowState() const OVERRIDE; 70
73 virtual void SetShelf(ShelfLayoutManager* shelf) OVERRIDE; 71 void SetShelf(ShelfLayoutManager* shelf);
74 virtual void SetActiveWorkspaceByWindow(aura::Window* window) OVERRIDE; 72
75 virtual aura::Window* GetParentForNewWindow(aura::Window* window) OVERRIDE; 73 // Activates the workspace containing |window|. Does nothing if |window| is
76 virtual void DoInitialAnimation() OVERRIDE; 74 // NULL or not contained in a workspace.
75 void SetActiveWorkspaceByWindow(aura::Window* window);
76
77 // Returns the parent for |window|. This is invoked from StackingController
78 // when a new Window is being added.
79 aura::Window* GetParentForNewWindow(aura::Window* window);
80
81 // Starts the animation that occurs on first login.
82 void DoInitialAnimation();
77 83
78 // ShellObserver overrides: 84 // ShellObserver overrides:
79 virtual void OnAppTerminating() OVERRIDE; 85 virtual void OnAppTerminating() OVERRIDE;
80 86
81 private: 87 private:
82 friend class WorkspaceLayoutManager2; 88 friend class WorkspaceLayoutManager2;
83 friend class WorkspaceManager2Test; 89 friend class WorkspaceManager2Test;
84 90
85 class LayoutManagerImpl; 91 class LayoutManagerImpl;
86 92
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 // DesktopBackgroundFadeController. 250 // DesktopBackgroundFadeController.
245 bool creating_fade_; 251 bool creating_fade_;
246 252
247 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager2); 253 DISALLOW_COPY_AND_ASSIGN(WorkspaceManager2);
248 }; 254 };
249 255
250 } // namespace internal 256 } // namespace internal
251 } // namespace ash 257 } // namespace ash
252 258
253 #endif // ASH_WM_WORKSPACE_WORKSPACE_MANAGER2_H_ 259 #endif // ASH_WM_WORKSPACE_WORKSPACE_MANAGER2_H_
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | ash/wm/workspace/workspace_manager2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698