| 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_PANELS_PANEL_LAYOUT_MANAGER_H_ | 5 #ifndef ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
| 6 #define ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 6 #define ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
| 12 #include "ash/common/shelf/wm_shelf_observer.h" | 12 #include "ash/common/shelf/wm_shelf_observer.h" |
| 13 #include "ash/common/shell_observer.h" | 13 #include "ash/common/shell_observer.h" |
| 14 #include "ash/common/wm/window_state_observer.h" | 14 #include "ash/common/wm/window_state_observer.h" |
| 15 #include "ash/common/wm_display_observer.h" | 15 #include "ash/common/wm_display_observer.h" |
| 16 #include "ash/common/wm_layout_manager.h" | 16 #include "ash/common/wm_layout_manager.h" |
| 17 #include "ash/root_window_controller.h" | 17 #include "ash/root_window_controller.h" |
| 18 #include "base/compiler_specific.h" | 18 #include "base/compiler_specific.h" |
| 19 #include "base/macros.h" | 19 #include "base/macros.h" |
| 20 #include "base/memory/weak_ptr.h" | 20 #include "base/memory/weak_ptr.h" |
| 21 #include "base/scoped_observer.h" |
| 21 #include "ui/aura/window_observer.h" | 22 #include "ui/aura/window_observer.h" |
| 22 #include "ui/aura/window_tracker.h" | 23 #include "ui/aura/window_tracker.h" |
| 23 #include "ui/keyboard/keyboard_controller.h" | 24 #include "ui/keyboard/keyboard_controller.h" |
| 24 #include "ui/keyboard/keyboard_controller_observer.h" | 25 #include "ui/keyboard/keyboard_controller_observer.h" |
| 25 #include "ui/wm/public/activation_change_observer.h" | 26 #include "ui/wm/public/activation_change_observer.h" |
| 26 | 27 |
| 27 namespace gfx { | 28 namespace gfx { |
| 28 class Rect; | 29 class Rect; |
| 29 } | 30 } |
| 30 | 31 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void OnWindowAddedToLayout(WmWindow* child) override; | 89 void OnWindowAddedToLayout(WmWindow* child) override; |
| 89 void OnWillRemoveWindowFromLayout(WmWindow* child) override; | 90 void OnWillRemoveWindowFromLayout(WmWindow* child) override; |
| 90 void OnWindowRemovedFromLayout(WmWindow* child) override; | 91 void OnWindowRemovedFromLayout(WmWindow* child) override; |
| 91 void OnChildWindowVisibilityChanged(WmWindow* child, bool visibile) override; | 92 void OnChildWindowVisibilityChanged(WmWindow* child, bool visibile) override; |
| 92 void SetChildBounds(WmWindow* child, | 93 void SetChildBounds(WmWindow* child, |
| 93 const gfx::Rect& requested_bounds) override; | 94 const gfx::Rect& requested_bounds) override; |
| 94 | 95 |
| 95 // Overridden from ShellObserver: | 96 // Overridden from ShellObserver: |
| 96 void OnOverviewModeEnded() override; | 97 void OnOverviewModeEnded() override; |
| 97 void OnShelfAlignmentChanged(WmWindow* root_window) override; | 98 void OnShelfAlignmentChanged(WmWindow* root_window) override; |
| 99 void OnVirtualKeyboardStateChanged(bool activated, |
| 100 WmWindow* root_window) override; |
| 98 | 101 |
| 99 // Overridden from aura::WindowObserver | 102 // Overridden from aura::WindowObserver |
| 100 void OnWindowPropertyChanged(aura::Window* window, | 103 void OnWindowPropertyChanged(aura::Window* window, |
| 101 const void* key, | 104 const void* key, |
| 102 intptr_t old) override; | 105 intptr_t old) override; |
| 103 | 106 |
| 104 // Overridden from wm::WindowStateObserver | 107 // Overridden from wm::WindowStateObserver |
| 105 void OnPostWindowStateTypeChange(wm::WindowState* window_state, | 108 void OnPostWindowStateTypeChange(wm::WindowState* window_state, |
| 106 wm::WindowStateType old_type) override; | 109 wm::WindowStateType old_type) override; |
| 107 | 110 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 WmShelf* shelf_; | 192 WmShelf* shelf_; |
| 190 | 193 |
| 191 // When not NULL, the shelf is hidden (i.e. full screen) and this tracks the | 194 // When not NULL, the shelf is hidden (i.e. full screen) and this tracks the |
| 192 // set of panel windows which have been temporarily hidden and need to be | 195 // set of panel windows which have been temporarily hidden and need to be |
| 193 // restored when the shelf becomes visible again. | 196 // restored when the shelf becomes visible again. |
| 194 std::unique_ptr<aura::WindowTracker> restore_windows_on_shelf_visible_; | 197 std::unique_ptr<aura::WindowTracker> restore_windows_on_shelf_visible_; |
| 195 | 198 |
| 196 // The last active panel. Used to maintain stacking order even if no panels | 199 // The last active panel. Used to maintain stacking order even if no panels |
| 197 // are currently focused. | 200 // are currently focused. |
| 198 WmWindow* last_active_panel_; | 201 WmWindow* last_active_panel_; |
| 202 |
| 203 ScopedObserver<keyboard::KeyboardController, |
| 204 keyboard::KeyboardControllerObserver> |
| 205 keyboard_observer_; |
| 206 |
| 199 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; | 207 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; |
| 200 | 208 |
| 201 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); | 209 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); |
| 202 }; | 210 }; |
| 203 | 211 |
| 204 } // namespace ash | 212 } // namespace ash |
| 205 | 213 |
| 206 #endif // ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ | 214 #endif // ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ |
| OLD | NEW |