| OLD | NEW |
| (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_ | |
| OLD | NEW |