| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| 6 #define ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 6 #define ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/common/shell_observer.h" | 12 #include "ash/common/shell_observer.h" |
| 13 #include "ash/common/wm/window_state_observer.h" | 13 #include "ash/common/wm/window_state_observer.h" |
| 14 #include "ash/common/wm/wm_types.h" | 14 #include "ash/common/wm/wm_types.h" |
| 15 #include "ash/common/wm_activation_observer.h" | |
| 16 #include "ash/common/wm_layout_manager.h" | 15 #include "ash/common/wm_layout_manager.h" |
| 17 #include "base/macros.h" | 16 #include "base/macros.h" |
| 18 #include "ui/aura/window_observer.h" | 17 #include "ui/aura/window_observer.h" |
| 19 #include "ui/display/display_observer.h" | 18 #include "ui/display/display_observer.h" |
| 20 #include "ui/gfx/geometry/rect.h" | 19 #include "ui/gfx/geometry/rect.h" |
| 21 #include "ui/keyboard/keyboard_controller_observer.h" | 20 #include "ui/keyboard/keyboard_controller_observer.h" |
| 21 #include "ui/wm/public/activation_change_observer.h" |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 | 24 |
| 25 class RootWindowController; | 25 class RootWindowController; |
| 26 class WmShell; | 26 class WmShell; |
| 27 class WmWindow; | 27 class WmWindow; |
| 28 class WorkspaceLayoutManagerBackdropDelegate; | 28 class WorkspaceLayoutManagerBackdropDelegate; |
| 29 | 29 |
| 30 namespace wm { | 30 namespace wm { |
| 31 class WMEvent; | 31 class WMEvent; |
| 32 } | 32 } |
| 33 | 33 |
| 34 // LayoutManager used on the window created for a workspace. | 34 // LayoutManager used on the window created for a workspace. |
| 35 class ASH_EXPORT WorkspaceLayoutManager | 35 class ASH_EXPORT WorkspaceLayoutManager |
| 36 : public WmLayoutManager, | 36 : public WmLayoutManager, |
| 37 public aura::WindowObserver, | 37 public aura::WindowObserver, |
| 38 public WmActivationObserver, | 38 public aura::client::ActivationChangeObserver, |
| 39 public keyboard::KeyboardControllerObserver, | 39 public keyboard::KeyboardControllerObserver, |
| 40 public display::DisplayObserver, | 40 public display::DisplayObserver, |
| 41 public ShellObserver, | 41 public ShellObserver, |
| 42 public wm::WindowStateObserver { | 42 public wm::WindowStateObserver { |
| 43 public: | 43 public: |
| 44 // |window| is the container for this layout manager. | 44 // |window| is the container for this layout manager. |
| 45 explicit WorkspaceLayoutManager(WmWindow* window); | 45 explicit WorkspaceLayoutManager(WmWindow* window); |
| 46 ~WorkspaceLayoutManager() override; | 46 ~WorkspaceLayoutManager() override; |
| 47 | 47 |
| 48 // A delegate which can be set to add a backdrop behind the top most visible | 48 // A delegate which can be set to add a backdrop behind the top most visible |
| (...skipping 15 matching lines...) Expand all Loading... |
| 64 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; | 64 void OnWindowHierarchyChanged(const HierarchyChangeParams& params) override; |
| 65 void OnWindowPropertyChanged(aura::Window* window, | 65 void OnWindowPropertyChanged(aura::Window* window, |
| 66 const void* key, | 66 const void* key, |
| 67 intptr_t old) override; | 67 intptr_t old) override; |
| 68 void OnWindowStackingChanged(aura::Window* window) override; | 68 void OnWindowStackingChanged(aura::Window* window) override; |
| 69 void OnWindowDestroying(aura::Window* window) override; | 69 void OnWindowDestroying(aura::Window* window) override; |
| 70 void OnWindowBoundsChanged(aura::Window* window, | 70 void OnWindowBoundsChanged(aura::Window* window, |
| 71 const gfx::Rect& old_bounds, | 71 const gfx::Rect& old_bounds, |
| 72 const gfx::Rect& new_bounds) override; | 72 const gfx::Rect& new_bounds) override; |
| 73 | 73 |
| 74 // WmActivationObserver overrides: | 74 // aura::client::ActivationChangeObserver overrides: |
| 75 void OnWindowActivated(WmWindow* gained_active, | 75 void OnWindowActivated(ActivationReason reason, |
| 76 WmWindow* lost_active) override; | 76 aura::Window* gained_active, |
| 77 aura::Window* lost_active) override; |
| 77 | 78 |
| 78 // keyboard::KeyboardControllerObserver overrides: | 79 // keyboard::KeyboardControllerObserver overrides: |
| 79 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; | 80 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; |
| 80 void OnKeyboardClosed() override; | 81 void OnKeyboardClosed() override; |
| 81 | 82 |
| 82 // WindowStateObserver overrides: | 83 // WindowStateObserver overrides: |
| 83 void OnPostWindowStateTypeChange(wm::WindowState* window_state, | 84 void OnPostWindowStateTypeChange(wm::WindowState* window_state, |
| 84 wm::WindowStateType old_type) override; | 85 wm::WindowStateType old_type) override; |
| 85 | 86 |
| 86 // display::DisplayObserver overrides: | 87 // display::DisplayObserver overrides: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // A window which covers the full container and which gets inserted behind the | 133 // A window which covers the full container and which gets inserted behind the |
| 133 // topmost visible window. | 134 // topmost visible window. |
| 134 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> backdrop_delegate_; | 135 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> backdrop_delegate_; |
| 135 | 136 |
| 136 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 137 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
| 137 }; | 138 }; |
| 138 | 139 |
| 139 } // namespace ash | 140 } // namespace ash |
| 140 | 141 |
| 141 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 142 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| OLD | NEW |