| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef ASH_COMMON_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ | 5 #ifndef ASH_COMMON_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ |
| 6 #define ASH_COMMON_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ | 6 #define ASH_COMMON_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 explicit WorkspaceBackdropDelegate(WmWindow* container); | 28 explicit WorkspaceBackdropDelegate(WmWindow* container); |
| 29 ~WorkspaceBackdropDelegate() override; | 29 ~WorkspaceBackdropDelegate() override; |
| 30 | 30 |
| 31 // WorkspaceLayoutManagerBackdropDelegate overrides: | 31 // WorkspaceLayoutManagerBackdropDelegate overrides: |
| 32 void OnWindowAddedToLayout(WmWindow* child) override; | 32 void OnWindowAddedToLayout(WmWindow* child) override; |
| 33 void OnWindowRemovedFromLayout(WmWindow* child) override; | 33 void OnWindowRemovedFromLayout(WmWindow* child) override; |
| 34 void OnChildWindowVisibilityChanged(WmWindow* child, bool visible) override; | 34 void OnChildWindowVisibilityChanged(WmWindow* child, bool visible) override; |
| 35 void OnWindowStackingChanged(WmWindow* window) override; | 35 void OnWindowStackingChanged(WmWindow* window) override; |
| 36 void OnPostWindowStateTypeChange(wm::WindowState* window_state, | 36 void OnPostWindowStateTypeChange(wm::WindowState* window_state, |
| 37 wm::WindowStateType old_type) override; | 37 wm::WindowStateType old_type) override; |
| 38 void OnDisplayWorkAreaInsetsChanged() override; | |
| 39 | 38 |
| 40 private: | 39 private: |
| 41 class WindowObserverImpl; | |
| 42 | |
| 43 // Restack the backdrop relatively to the other windows in the container. | 40 // Restack the backdrop relatively to the other windows in the container. |
| 44 void RestackBackdrop(); | 41 void RestackBackdrop(); |
| 45 | 42 |
| 46 // Returns the current visible top level window in the container. | 43 // Returns the current visible top level window in the container. |
| 47 WmWindow* GetCurrentTopWindow(); | 44 WmWindow* GetCurrentTopWindow(); |
| 48 | 45 |
| 49 // Position & size the background over the container window. | |
| 50 void AdjustToContainerBounds(); | |
| 51 | |
| 52 // Show the overlay. | 46 // Show the overlay. |
| 53 void Show(); | 47 void Show(); |
| 54 | 48 |
| 55 std::unique_ptr<WindowObserverImpl> container_observer_; | |
| 56 | |
| 57 // The background which covers the rest of the screen. | 49 // The background which covers the rest of the screen. |
| 58 views::Widget* background_ = nullptr; | 50 views::Widget* background_ = nullptr; |
| 59 // WmWindow for |background_|. | 51 // WmWindow for |background_|. |
| 60 WmWindow* background_window_ = nullptr; | 52 WmWindow* background_window_ = nullptr; |
| 61 | 53 |
| 62 // The window which is being "maximized". | 54 // The window which is being "maximized". |
| 63 WmWindow* container_; | 55 WmWindow* container_; |
| 64 | 56 |
| 65 // If true, the |RestackOrHideWindow| might recurse. | 57 // If true, the |RestackOrHideWindow| might recurse. |
| 66 bool in_restacking_; | 58 bool in_restacking_; |
| 67 | 59 |
| 68 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate); | 60 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate); |
| 69 }; | 61 }; |
| 70 | 62 |
| 71 } // namespace ash | 63 } // namespace ash |
| 72 | 64 |
| 73 #endif // ASH_COMMON_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ | 65 #endif // ASH_COMMON_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ |
| OLD | NEW |