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

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: 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
(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.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 MaximizeBackdropDelegate {
32 public:
33 explicit WorkspaceBackdropDelegate(aura::Window* container);
34 virtual ~WorkspaceBackdropDelegate();
35
36 virtual void RestackBackdrop() OVERRIDE;
37
38 // WindowObserver overrides:
39 virtual void OnWindowBoundsChanged(aura::Window* window,
40 const gfx::Rect& old_bounds,
41 const gfx::Rect& new_bounds) OVERRIDE;
42
43 private:
44 // Position & size the background over the container window.
45 void AdjustToContainerBounds();
46
47 // Show the overlay.
48 void Show();
49
50 // The background which covers the rest of the screen.
51 views::Widget* background_;
52
53 // The window which is being "maximized".
54 aura::Window* container_;
55
56 // If true, the |RestackOrHideWindow| might recurse.
57 bool inside_;
58
59 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate);
60 };
61
62 } // namespace internal
63
64 } // namespace ash
65
66 #endif // ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698