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

Side by Side Diff: ash/wm/maximize_mode/workspace_backdrop_delegate.h

Issue 2890733005: Refactor backdrop that is currently used in the maximized mode. (Closed)
Patch Set: fix memory issue in AshTouchExplorationManager Created 3 years, 7 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
OLDNEW
(Empty)
1 // Copyright 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 <memory>
9
10 #include "ash/ash_export.h"
11 #include "ash/wm/workspace/workspace_layout_manager_backdrop_delegate.h"
12 #include "base/macros.h"
13
14 namespace views {
15 class Widget;
16 }
17
18 namespace ash {
19
20 class WmWindow;
21
22 // A background which gets created for a container |window| and which gets
23 // stacked behind the topmost window (within that container) covering the
24 // entire container.
25 class ASH_EXPORT WorkspaceBackdropDelegate
26 : public WorkspaceLayoutManagerBackdropDelegate {
27 public:
28 explicit WorkspaceBackdropDelegate(WmWindow* container);
29 ~WorkspaceBackdropDelegate() override;
30
31 // WorkspaceLayoutManagerBackdropDelegate overrides:
32 void OnWindowAddedToLayout(WmWindow* child) override;
33 void OnWindowRemovedFromLayout(WmWindow* child) override;
34 void OnChildWindowVisibilityChanged(WmWindow* child, bool visible) override;
35 void OnWindowStackingChanged(WmWindow* window) override;
36 void OnPostWindowStateTypeChange(wm::WindowState* window_state,
37 wm::WindowStateType old_type) override;
38
39 private:
40 // Restack the backdrop relatively to the other windows in the container.
41 void RestackBackdrop();
42
43 // Returns the current visible top level window in the container.
44 WmWindow* GetCurrentTopWindow();
45
46 // Show the overlay.
47 void Show();
48
49 // The background which covers the rest of the screen.
50 views::Widget* background_ = nullptr;
51 // WmWindow for |background_|.
52 WmWindow* background_window_ = nullptr;
53
54 // The window which is being "maximized".
55 WmWindow* container_;
56
57 // If true, the |RestackOrHideWindow| might recurse.
58 bool in_restacking_;
59
60 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate);
61 };
62
63 } // namespace ash
64
65 #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