| 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_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ | 5 #ifndef ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ |
| 6 #define ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ | 6 #define ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/wm/workspace/workspace_layout_manager_delegate.h" | 9 #include "ash/wm/workspace/workspace_layout_manager_delegate.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 class ASH_EXPORT WorkspaceBackdropDelegate | 30 class ASH_EXPORT WorkspaceBackdropDelegate |
| 31 : public aura::WindowObserver, | 31 : public aura::WindowObserver, |
| 32 public NON_EXPORTED_BASE(WorkspaceLayoutManagerDelegate) { | 32 public NON_EXPORTED_BASE(WorkspaceLayoutManagerDelegate) { |
| 33 public: | 33 public: |
| 34 explicit WorkspaceBackdropDelegate(aura::Window* container); | 34 explicit WorkspaceBackdropDelegate(aura::Window* container); |
| 35 virtual ~WorkspaceBackdropDelegate(); | 35 virtual ~WorkspaceBackdropDelegate(); |
| 36 | 36 |
| 37 // WindowObserver overrides: | 37 // WindowObserver overrides: |
| 38 virtual void OnWindowBoundsChanged(aura::Window* window, | 38 virtual void OnWindowBoundsChanged(aura::Window* window, |
| 39 const gfx::Rect& old_bounds, | 39 const gfx::Rect& old_bounds, |
| 40 const gfx::Rect& new_bounds) OVERRIDE; | 40 const gfx::Rect& new_bounds) override; |
| 41 | 41 |
| 42 // WorkspaceLayoutManagerDelegate overrides: | 42 // WorkspaceLayoutManagerDelegate overrides: |
| 43 virtual void OnWindowAddedToLayout(aura::Window* child) OVERRIDE; | 43 virtual void OnWindowAddedToLayout(aura::Window* child) override; |
| 44 virtual void OnWindowRemovedFromLayout(aura::Window* child) OVERRIDE; | 44 virtual void OnWindowRemovedFromLayout(aura::Window* child) override; |
| 45 virtual void OnChildWindowVisibilityChanged(aura::Window* child, | 45 virtual void OnChildWindowVisibilityChanged(aura::Window* child, |
| 46 bool visible) OVERRIDE; | 46 bool visible) override; |
| 47 virtual void OnWindowStackingChanged(aura::Window* window) OVERRIDE; | 47 virtual void OnWindowStackingChanged(aura::Window* window) override; |
| 48 virtual void OnPostWindowStateTypeChange( | 48 virtual void OnPostWindowStateTypeChange( |
| 49 wm::WindowState* window_state, | 49 wm::WindowState* window_state, |
| 50 wm::WindowStateType old_type) OVERRIDE; | 50 wm::WindowStateType old_type) override; |
| 51 virtual void OnDisplayWorkAreaInsetsChanged() OVERRIDE; | 51 virtual void OnDisplayWorkAreaInsetsChanged() override; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 // Restack the backdrop relatively to the other windows in the container. | 54 // Restack the backdrop relatively to the other windows in the container. |
| 55 void RestackBackdrop(); | 55 void RestackBackdrop(); |
| 56 | 56 |
| 57 // Returns the current visible top level window in the container. | 57 // Returns the current visible top level window in the container. |
| 58 aura::Window* GetCurrentTopWindow(); | 58 aura::Window* GetCurrentTopWindow(); |
| 59 | 59 |
| 60 // Position & size the background over the container window. | 60 // Position & size the background over the container window. |
| 61 void AdjustToContainerBounds(); | 61 void AdjustToContainerBounds(); |
| 62 | 62 |
| 63 // Show the overlay. | 63 // Show the overlay. |
| 64 void Show(); | 64 void Show(); |
| 65 | 65 |
| 66 // The background which covers the rest of the screen. | 66 // The background which covers the rest of the screen. |
| 67 views::Widget* background_; | 67 views::Widget* background_; |
| 68 | 68 |
| 69 // The window which is being "maximized". | 69 // The window which is being "maximized". |
| 70 aura::Window* container_; | 70 aura::Window* container_; |
| 71 | 71 |
| 72 // If true, the |RestackOrHideWindow| might recurse. | 72 // If true, the |RestackOrHideWindow| might recurse. |
| 73 bool in_restacking_; | 73 bool in_restacking_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate); | 75 DISALLOW_COPY_AND_ASSIGN(WorkspaceBackdropDelegate); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace ash | 78 } // namespace ash |
| 79 | 79 |
| 80 #endif // ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ | 80 #endif // ASH_WM_MAXIMIZE_MODE_WORKSPACE_BACKDROP_DELEGATE_H_ |
| OLD | NEW |