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

Side by Side Diff: ash/common/wm/workspace/workspace_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
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_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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 wm::WindowStateType old_type) override; 90 wm::WindowStateType old_type) override;
86 91
87 // display::DisplayObserver overrides: 92 // display::DisplayObserver overrides:
88 void OnDisplayMetricsChanged(const display::Display& display, 93 void OnDisplayMetricsChanged(const display::Display& display,
89 uint32_t changed_metrics) override; 94 uint32_t changed_metrics) override;
90 95
91 // ShellObserver overrides: 96 // ShellObserver overrides:
92 void OnFullscreenStateChanged(bool is_fullscreen, 97 void OnFullscreenStateChanged(bool is_fullscreen,
93 WmWindow* root_window) override; 98 WmWindow* root_window) override;
94 void OnPinnedStateChanged(WmWindow* pinned_window) override; 99 void OnPinnedStateChanged(WmWindow* pinned_window) override;
100 void OnVirtualKeyboardStateChanged(bool activated,
101 WmWindow* root_window) override;
95 102
96 private: 103 private:
97 typedef std::set<WmWindow*> WindowSet; 104 typedef std::set<WmWindow*> WindowSet;
98 105
99 // Adjusts the bounds of all managed windows when the display area changes. 106 // Adjusts the bounds of all managed windows when the display area changes.
100 // This happens when the display size, work area insets has changed. 107 // This happens when the display size, work area insets has changed.
101 // If this is called for a display size change (i.e. |event| 108 // If this is called for a display size change (i.e. |event|
102 // is DISPLAY_RESIZED), the non-maximized/non-fullscreen 109 // is DISPLAY_RESIZED), the non-maximized/non-fullscreen
103 // windows are readjusted to make sure the window is completely within the 110 // windows are readjusted to make sure the window is completely within the
104 // display region. Otherwise, it makes sure at least some parts of the window 111 // display region. Otherwise, it makes sure at least some parts of the window
(...skipping 22 matching lines...) Expand all
127 // The work area in the coordinates of |window_|. 134 // The work area in the coordinates of |window_|.
128 gfx::Rect work_area_in_parent_; 135 gfx::Rect work_area_in_parent_;
129 136
130 // True if this workspace is currently in fullscreen mode. 137 // True if this workspace is currently in fullscreen mode.
131 bool is_fullscreen_; 138 bool is_fullscreen_;
132 139
133 // A window which covers the full container and which gets inserted behind the 140 // A window which covers the full container and which gets inserted behind the
134 // topmost visible window. 141 // topmost visible window.
135 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> backdrop_delegate_; 142 std::unique_ptr<WorkspaceLayoutManagerBackdropDelegate> backdrop_delegate_;
136 143
144 ScopedObserver<keyboard::KeyboardController,
145 keyboard::KeyboardControllerObserver>
146 keyboard_observer_;
147
137 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager); 148 DISALLOW_COPY_AND_ASSIGN(WorkspaceLayoutManager);
138 }; 149 };
139 150
140 } // namespace ash 151 } // namespace ash
141 152
142 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_ 153 #endif // ASH_COMMON_WM_WORKSPACE_WORKSPACE_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/common/wm/panels/panel_layout_manager.cc ('k') | ash/common/wm/workspace/workspace_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698