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

Side by Side Diff: ash/wm/workspace/workspace_layout_manager_backdrop.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: Added unit tests Created 6 years, 10 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_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_BACKDROP_H_
6 #define ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_BACKDROP_H_
7
8 #include "ui/aura/window_observer.h"
9
10 namespace aura {
11 class Window;
12 }
13
14 namespace ui {
15 class Layer;
16 }
17
18 namespace views {
19 class Widget;
20 }
21
22 namespace ash {
23
24 namespace internal {
25
26 // A background which gets created for a container |window| and which gets
27 // stacked behind the topmost window (within that container) covering the
28 // entire container.
29 class WorkspaceLayoutManagerBackdrop : public aura::WindowObserver {
30 public:
31 explicit WorkspaceLayoutManagerBackdrop(aura::Window* container);
32 virtual ~WorkspaceLayoutManagerBackdrop();
33
34 void RestackOrHideWindow();
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 private:
42 // Position & size the background over the container window.
43 void AdjustToContainerBounds();
44
45 // Show the overlay.
46 void Show();
47
48 // The background which covers the rest of the screen.
49 views::Widget* background_;
50
51 // The window which is being "maximized".
52 aura::Window* container_;
53
54 // If true, the |RestackOrHideWindow| might recurse.
55 bool inside_;
56
57 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManagerBackdrop);
58 };
59
60 } // namespace internal
61
62 } // namespace ash
63
64 #endif // ASH_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_BACKDROP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698