Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: ash/common/wm/panels/panel_layout_manager.h

Issue 2747543002: ash: Start/stop observing KeyboardController via ShellObserver (Closed)
Patch Set: update keyboard container before notifying keyboard state observers Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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) override;
98 100
99 // Overridden from aura::WindowObserver 101 // Overridden from aura::WindowObserver
100 void OnWindowPropertyChanged(aura::Window* window, 102 void OnWindowPropertyChanged(aura::Window* window,
101 const void* key, 103 const void* key,
102 intptr_t old) override; 104 intptr_t old) override;
103 105
104 // Overridden from wm::WindowStateObserver 106 // Overridden from wm::WindowStateObserver
105 void OnPostWindowStateTypeChange(wm::WindowState* window_state, 107 void OnPostWindowStateTypeChange(wm::WindowState* window_state,
106 wm::WindowStateType old_type) override; 108 wm::WindowStateType old_type) override;
107 109
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 WmShelf* shelf_; 191 WmShelf* shelf_;
190 192
191 // When not NULL, the shelf is hidden (i.e. full screen) and this tracks the 193 // 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 194 // set of panel windows which have been temporarily hidden and need to be
193 // restored when the shelf becomes visible again. 195 // restored when the shelf becomes visible again.
194 std::unique_ptr<aura::WindowTracker> restore_windows_on_shelf_visible_; 196 std::unique_ptr<aura::WindowTracker> restore_windows_on_shelf_visible_;
195 197
196 // The last active panel. Used to maintain stacking order even if no panels 198 // The last active panel. Used to maintain stacking order even if no panels
197 // are currently focused. 199 // are currently focused.
198 WmWindow* last_active_panel_; 200 WmWindow* last_active_panel_;
201
202 ScopedObserver<keyboard::KeyboardController,
203 keyboard::KeyboardControllerObserver>
204 keyboard_observer_;
205
199 base::WeakPtrFactory<PanelLayoutManager> weak_factory_; 206 base::WeakPtrFactory<PanelLayoutManager> weak_factory_;
200 207
201 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager); 208 DISALLOW_COPY_AND_ASSIGN(PanelLayoutManager);
202 }; 209 };
203 210
204 } // namespace ash 211 } // namespace ash
205 212
206 #endif // ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_ 213 #endif // ASH_COMMON_WM_PANELS_PANEL_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698