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

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

Issue 169643005: Adding a gray semi transparent backdrop behind the topmost window within the default container (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 6 years, 9 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
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_LAYOUT_MANAGER_H_ 5 #ifndef ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/shell_observer.h" 11 #include "ash/shell_observer.h"
12 #include "ash/wm/window_state_observer.h" 12 #include "ash/wm/window_state_observer.h"
13 #include "ash/wm/wm_types.h" 13 #include "ash/wm/wm_types.h"
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/memory/scoped_ptr.h"
16 #include "ui/aura/client/activation_change_observer.h" 17 #include "ui/aura/client/activation_change_observer.h"
17 #include "ui/aura/layout_manager.h" 18 #include "ui/aura/layout_manager.h"
18 #include "ui/aura/window_observer.h" 19 #include "ui/aura/window_observer.h"
19 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
20 21
21 namespace aura { 22 namespace aura {
22 class RootWindow; 23 class RootWindow;
23 class Window; 24 class Window;
24 } 25 }
25 26
26 namespace ui { 27 namespace ui {
27 class Layer; 28 class Layer;
28 } 29 }
29 30
30 namespace ash { 31 namespace ash {
31 namespace wm { 32 namespace wm {
32 class WindowState; 33 class WindowState;
33 class WMEvent; 34 class WMEvent;
34 } 35 }
35 36
36 namespace internal { 37 namespace internal {
37 38
38 class ShelfLayoutManager; 39 class ShelfLayoutManager;
40 class WorkspaceLayoutManagerBackdrop;
sky 2014/03/06 21:34:13 You shouldn't need this.
Mr4D (OOO till 08-26) 2014/03/07 01:00:12 Done.
41
42 // A delegate which can be set to create and control a backdrop which gets
43 // placed below the top level window.
44 class MaximizeBackdropDelegate {
sky 2014/03/06 21:34:13 Move to own header and name WorkspaceLayoutManager
Mr4D (OOO till 08-26) 2014/03/07 01:00:12 Done.
45 public:
46 MaximizeBackdropDelegate() {}
47 virtual ~MaximizeBackdropDelegate() {}
48
49 // Call to restack the backdrop.
50 virtual void RestackBackdrop() = 0;
51 };
39 52
40 // LayoutManager used on the window created for a workspace. 53 // LayoutManager used on the window created for a workspace.
41 class ASH_EXPORT WorkspaceLayoutManager 54 class ASH_EXPORT WorkspaceLayoutManager
42 : public aura::LayoutManager, 55 : public aura::LayoutManager,
43 public aura::WindowObserver, 56 public aura::WindowObserver,
44 public aura::client::ActivationChangeObserver, 57 public aura::client::ActivationChangeObserver,
45 public ShellObserver, 58 public ShellObserver,
46 public wm::WindowStateObserver { 59 public wm::WindowStateObserver {
47 public: 60 public:
48 explicit WorkspaceLayoutManager(aura::Window* window); 61 explicit WorkspaceLayoutManager(aura::Window* window);
49 virtual ~WorkspaceLayoutManager(); 62 virtual ~WorkspaceLayoutManager();
50 63
51 void SetShelf(internal::ShelfLayoutManager* shelf); 64 void SetShelf(internal::ShelfLayoutManager* shelf);
52 65
66 // A delegate which can be set to add a backdrop behind the top most visible
67 // window. With the call the ownership of the delegate will be transferred to
68 // the WorkspaceLayoutManager.
69 void SetMaximizeBackdropDelegate(MaximizeBackdropDelegate* delegate);
sky 2014/03/06 21:34:13 Make take scoped_ptr.
Mr4D (OOO till 08-26) 2014/03/07 01:00:12 Done.
70
53 // Overridden from aura::LayoutManager: 71 // Overridden from aura::LayoutManager:
54 virtual void OnWindowResized() OVERRIDE {} 72 virtual void OnWindowResized() OVERRIDE {}
55 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; 73 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
56 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE; 74 virtual void OnWillRemoveWindowFromLayout(aura::Window* child) OVERRIDE;
57 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE; 75 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
58 virtual void OnChildWindowVisibilityChanged(aura::Window* child, 76 virtual void OnChildWindowVisibilityChanged(aura::Window* child,
59 bool visibile) OVERRIDE; 77 bool visibile) OVERRIDE;
60 virtual void SetChildBounds(aura::Window* child, 78 virtual void SetChildBounds(aura::Window* child,
61 const gfx::Rect& requested_bounds) OVERRIDE; 79 const gfx::Rect& requested_bounds) OVERRIDE;
62 80
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 139
122 // Set of windows we're listening to. 140 // Set of windows we're listening to.
123 WindowSet windows_; 141 WindowSet windows_;
124 142
125 // The work area in the coordinates of |window_|. 143 // The work area in the coordinates of |window_|.
126 gfx::Rect work_area_in_parent_; 144 gfx::Rect work_area_in_parent_;
127 145
128 // True if this workspace is currently in fullscreen mode. 146 // True if this workspace is currently in fullscreen mode.
129 bool is_fullscreen_; 147 bool is_fullscreen_;
130 148
149 // A window which covers the full container and which gets inserted behind the
150 // topmost visible window.
151 scoped_ptr<MaximizeBackdropDelegate> backdrop_delegate_;
152
131 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); 153 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager);
132 }; 154 };
133 155
134 } // namespace internal 156 } // namespace internal
135 } // namespace ash 157 } // namespace ash
136 158
137 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 159 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698