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

Side by Side Diff: ash/common/wm/dock/docked_window_layout_manager.h

Issue 2747543002: ash: Start/stop observing KeyboardController via ShellObserver (Closed)
Patch Set: update LockLayoutManager to use similar logic 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
« no previous file with comments | « ash/common/shell_observer.h ('k') | ash/common/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 5 #ifndef ASH_COMMON_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
6 #define ASH_COMMON_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 6 #define ASH_COMMON_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/shell_observer.h" 11 #include "ash/common/shell_observer.h"
12 #include "ash/common/wm/dock/dock_types.h" 12 #include "ash/common/wm/dock/dock_types.h"
13 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h" 13 #include "ash/common/wm/dock/docked_window_layout_manager_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/wm_snap_to_pixel_layout_manager.h" 15 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/scoped_observer.h"
19 #include "base/time/time.h" 20 #include "base/time/time.h"
20 #include "ui/aura/window_observer.h" 21 #include "ui/aura/window_observer.h"
21 #include "ui/display/display_observer.h" 22 #include "ui/display/display_observer.h"
22 #include "ui/gfx/geometry/rect.h" 23 #include "ui/gfx/geometry/rect.h"
23 #include "ui/keyboard/keyboard_controller_observer.h" 24 #include "ui/keyboard/keyboard_controller_observer.h"
24 #include "ui/wm/public/activation_change_observer.h" 25 #include "ui/wm/public/activation_change_observer.h"
25 26
27 namespace keyboard {
28 class KeyboardController;
29 }
30
26 namespace ash { 31 namespace ash {
27 class DockedBackgroundWidget; 32 class DockedBackgroundWidget;
28 class DockedWindowLayoutManagerObserver; 33 class DockedWindowLayoutManagerObserver;
29 class DockedWindowResizerTest; 34 class DockedWindowResizerTest;
30 class RootWindowController; 35 class RootWindowController;
31 class WmShelf; 36 class WmShelf;
32 37
33 // DockedWindowLayoutManager is responsible for organizing windows when they are 38 // DockedWindowLayoutManager is responsible for organizing windows when they are
34 // docked to the side of a screen. It is associated with a specific container 39 // docked to the side of a screen. It is associated with a specific container
35 // window (i.e. kShellWindowId_DockedContainer) and controls the layout of any 40 // window (i.e. kShellWindowId_DockedContainer) and controls the layout of any
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void OnWindowActivated(ActivationReason reason, 159 void OnWindowActivated(ActivationReason reason,
155 aura::Window* gained_active, 160 aura::Window* gained_active,
156 aura::Window* lost_active) override; 161 aura::Window* lost_active) override;
157 162
158 // ShellObserver: 163 // ShellObserver:
159 void OnShelfAlignmentChanged(WmWindow* root_window) override; 164 void OnShelfAlignmentChanged(WmWindow* root_window) override;
160 void OnFullscreenStateChanged(bool is_fullscreen, 165 void OnFullscreenStateChanged(bool is_fullscreen,
161 WmWindow* root_window) override; 166 WmWindow* root_window) override;
162 void OnOverviewModeStarting() override; 167 void OnOverviewModeStarting() override;
163 void OnOverviewModeEnded() override; 168 void OnOverviewModeEnded() override;
169 void OnVirtualKeyboardStateChanged(bool activated,
170 WmWindow* root_window) override;
164 171
165 private: 172 private:
166 struct CompareMinimumHeight; 173 struct CompareMinimumHeight;
167 struct CompareWindowPos; 174 struct CompareWindowPos;
168 class ShelfWindowObserver; 175 class ShelfWindowObserver;
169 struct WindowWithHeight; 176 struct WindowWithHeight;
170 177
171 friend class DockedWindowLayoutManagerTest; 178 friend class DockedWindowLayoutManagerTest;
172 friend class DockedWindowResizerTest; 179 friend class DockedWindowResizerTest;
173 180
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 315
309 // Observes shelf for bounds changes. 316 // Observes shelf for bounds changes.
310 std::unique_ptr<ShelfWindowObserver> shelf_observer_; 317 std::unique_ptr<ShelfWindowObserver> shelf_observer_;
311 318
312 // Widget used to paint a background for the docked area. 319 // Widget used to paint a background for the docked area.
313 std::unique_ptr<DockedBackgroundWidget> background_widget_; 320 std::unique_ptr<DockedBackgroundWidget> background_widget_;
314 321
315 // Observers of dock bounds changes. 322 // Observers of dock bounds changes.
316 base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_; 323 base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_;
317 324
325 ScopedObserver<keyboard::KeyboardController,
326 keyboard::KeyboardControllerObserver>
327 keyboard_observer_;
328
318 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager); 329 DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager);
319 }; 330 };
320 331
321 } // namespace ash 332 } // namespace ash
322 333
323 #endif // ASH_COMMON_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_ 334 #endif // ASH_COMMON_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/common/shell_observer.h ('k') | ash/common/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698