| 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_layout_manager.h" | 15 #include "ash/common/wm_layout_manager.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/scoped_observer.h" |
| 17 #include "ui/aura/window_observer.h" | 18 #include "ui/aura/window_observer.h" |
| 18 #include "ui/display/display_observer.h" | 19 #include "ui/display/display_observer.h" |
| 19 #include "ui/gfx/geometry/rect.h" | 20 #include "ui/gfx/geometry/rect.h" |
| 20 #include "ui/keyboard/keyboard_controller_observer.h" | 21 #include "ui/keyboard/keyboard_controller_observer.h" |
| 21 #include "ui/wm/public/activation_change_observer.h" | 22 #include "ui/wm/public/activation_change_observer.h" |
| 22 | 23 |
| 24 namespace keyboard { |
| 25 class KeyboardController; |
| 26 } |
| 27 |
| 23 namespace ash { | 28 namespace ash { |
| 24 | 29 |
| 25 class RootWindowController; | 30 class RootWindowController; |
| 26 class WmShell; | 31 class WmShell; |
| 27 class WmWindow; | 32 class WmWindow; |
| 28 class WorkspaceLayoutManagerBackdropDelegate; | 33 class WorkspaceLayoutManagerBackdropDelegate; |
| 29 | 34 |
| 30 namespace wm { | 35 namespace wm { |
| 31 class WMEvent; | 36 class WMEvent; |
| 32 } | 37 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 44 // |window| is the container for this layout manager. | 49 // |window| is the container for this layout manager. |
| 45 explicit WorkspaceLayoutManager(WmWindow* window); | 50 explicit WorkspaceLayoutManager(WmWindow* window); |
| 46 ~WorkspaceLayoutManager() override; | 51 ~WorkspaceLayoutManager() override; |
| 47 | 52 |
| 48 // A delegate which can be set to add a backdrop behind the top most visible | 53 // A delegate which can be set to add a backdrop behind the top most visible |
| 49 // window. With the call the ownership of the delegate will be transferred to | 54 // window. With the call the ownership of the delegate will be transferred to |
| 50 // the WorkspaceLayoutManager. | 55 // the WorkspaceLayoutManager. |
| 51 void SetMaximizeBackdropDelegate( | 56 void SetMaximizeBackdropDelegate( |
| 52 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate); | 57 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> delegate); |
| 53 | 58 |
| 59 void StartObservingKeyboard( |
| 60 keyboard::KeyboardController* keyboard_controller); |
| 61 void StopObservingKeyboard(keyboard::KeyboardController* keyboard_controller); |
| 62 |
| 54 // Overridden from WmLayoutManager: | 63 // Overridden from WmLayoutManager: |
| 55 void OnWindowResized() override; | 64 void OnWindowResized() override; |
| 56 void OnWindowAddedToLayout(WmWindow* child) override; | 65 void OnWindowAddedToLayout(WmWindow* child) override; |
| 57 void OnWillRemoveWindowFromLayout(WmWindow* child) override; | 66 void OnWillRemoveWindowFromLayout(WmWindow* child) override; |
| 58 void OnWindowRemovedFromLayout(WmWindow* child) override; | 67 void OnWindowRemovedFromLayout(WmWindow* child) override; |
| 59 void OnChildWindowVisibilityChanged(WmWindow* child, bool visibile) override; | 68 void OnChildWindowVisibilityChanged(WmWindow* child, bool visibile) override; |
| 60 void SetChildBounds(WmWindow* child, | 69 void SetChildBounds(WmWindow* child, |
| 61 const gfx::Rect& requested_bounds) override; | 70 const gfx::Rect& requested_bounds) override; |
| 62 | 71 |
| 63 // Overriden from aura::WindowObserver: | 72 // Overriden from aura::WindowObserver: |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // The work area in the coordinates of |window_|. | 136 // The work area in the coordinates of |window_|. |
| 128 gfx::Rect work_area_in_parent_; | 137 gfx::Rect work_area_in_parent_; |
| 129 | 138 |
| 130 // True if this workspace is currently in fullscreen mode. | 139 // True if this workspace is currently in fullscreen mode. |
| 131 bool is_fullscreen_; | 140 bool is_fullscreen_; |
| 132 | 141 |
| 133 // A window which covers the full container and which gets inserted behind the | 142 // A window which covers the full container and which gets inserted behind the |
| 134 // topmost visible window. | 143 // topmost visible window. |
| 135 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> backdrop_delegate_; | 144 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> backdrop_delegate_; |
| 136 | 145 |
| 146 ScopedObserver<keyboard::KeyboardController, |
| 147 keyboard::KeyboardControllerObserver> |
| 148 keyboard_observer_; |
| 149 |
| 137 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); | 150 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); |
| 138 }; | 151 }; |
| 139 | 152 |
| 140 } // namespace ash | 153 } // namespace ash |
| 141 | 154 |
| 142 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ | 155 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ |
| OLD | NEW |