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

Side by Side Diff: ash/wm/maximize_mode/workspace_backdrop_delegate.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: Fixing build problem 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
(Empty)
1 // Copyright (c) 2014 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_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_
6 #define ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_
7
8 #include "ash/wm/workspace/workspace_layout_manager_delegate.h"
9 #include "ui/aura/window_observer.h"
10
11 namespace aura {
12 class Window;
13 }
14
15 namespace ui {
16 class Layer;
17 }
18
19 namespace views {
20 class Widget;
21 }
22
23 namespace ash {
24
25 namespace internal {
26
27 // A background which gets created for a container |window| and which gets
28 // stacked behind the topmost window (within that container) covering the
29 // entire container.
30 class WorkspaceBackdropDelegate : public aura::WindowObserver,
31 public WorkspaceLayoutManagerDelegate {
32 public:
33 explicit WorkspaceBackdropDelegate(aura::Window* container);
34 virtual ~WorkspaceBackdropDelegate();
35
36 // WindowObserver overrides:
37 virtual void OnWindowBoundsChanged(aura::Window* window,
38 const gfx::Rect& old_bounds,
39 const gfx::Rect& new_bounds) OVERRIDE;
40
41 // WorkspaceLayoutManagerDelegate overrides:
42 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE;
43 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE;
44 virtual void OnChildWindowVisibilityChanged(aura::Window* child,
45 bool visible) OVERRIDE;
46 virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE;
47 virtual void OnPostWindowStateTypeChange(
48 wm::WindowState* window_state,
49 wm::WindowStateType old_type) OVERRIDE;
50
51 private:
52 // Restack the backdrop relatively to the other windows in the container.
53 void RestackBackdrop();
54
55 // Returns the current visible top level window in the container.
56 aura::Window* GetCurrentTopWindow();
57
58 // Position & size the background over the container window.
59 void AdjustToContainerBounds();
60
61 // Show the overlay.
62 void Show();
63
64 // The background which covers the rest of the screen.
65 views::Widget* background_;
66
67 // The window which is being "maximized".
68 aura::Window* container_;
69
70 // If true, the |RestackOrHideWindow| might recurse.
71 bool in_restacking_;
72
73 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate);
74 };
75
76 } // namespace internal
77
78 } // namespace ash
79
80 #endif // ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/wm/maximize_mode/workspace_backdrop_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698