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

Side by Side Diff: ash/common/wm/lock_layout_manager.h

Issue 2747543002: ash: Start/stop observing KeyboardController via ShellObserver (Closed)
Patch Set: pass root_window to OnVirtualKeyboardStateChanged() 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_LOCK_LAYOUT_MANAGER_H_ 5 #ifndef ASH_COMMON_WM_LOCK_LAYOUT_MANAGER_H_
6 #define ASH_COMMON_WM_LOCK_LAYOUT_MANAGER_H_ 6 #define ASH_COMMON_WM_LOCK_LAYOUT_MANAGER_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/shell_observer.h" 9 #include "ash/common/shell_observer.h"
10 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h" 10 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void SetChildBounds(WmWindow* child, 50 void SetChildBounds(WmWindow* child,
51 const gfx::Rect& requested_bounds) override; 51 const gfx::Rect& requested_bounds) override;
52 52
53 // Overriden from aura::WindowObserver: 53 // Overriden from aura::WindowObserver:
54 void OnWindowDestroying(aura::Window* window) override; 54 void OnWindowDestroying(aura::Window* window) override;
55 void OnWindowBoundsChanged(aura::Window* window, 55 void OnWindowBoundsChanged(aura::Window* window,
56 const gfx::Rect& old_bounds, 56 const gfx::Rect& old_bounds,
57 const gfx::Rect& new_bounds) override; 57 const gfx::Rect& new_bounds) override;
58 58
59 // ShellObserver: 59 // ShellObserver:
60 void OnVirtualKeyboardStateChanged(bool activated) override; 60 void OnVirtualKeyboardStateChanged(bool activated,
61 WmWindow* root_window) override;
61 62
62 // keyboard::KeyboardControllerObserver overrides: 63 // keyboard::KeyboardControllerObserver overrides:
63 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; 64 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
64 void OnKeyboardClosed() override; 65 void OnKeyboardClosed() override;
65 66
66 private: 67 private:
67 // Adjusts the bounds of all managed windows when the display area changes. 68 // Adjusts the bounds of all managed windows when the display area changes.
68 // This happens when the display size, work area insets has changed. 69 // This happens when the display size, work area insets has changed.
69 void AdjustWindowsForWorkAreaChange(const wm::WMEvent* event); 70 void AdjustWindowsForWorkAreaChange(const wm::WMEvent* event);
70 71
71 WmWindow* window_; 72 WmWindow* window_;
72 WmWindow* root_window_; 73 WmWindow* root_window_;
73 74
74 // True is subscribed as keyboard controller observer. 75 // True is subscribed as keyboard controller observer.
75 bool is_observing_keyboard_; 76 bool is_observing_keyboard_;
76 77
77 // The bounds of the keyboard. 78 // The bounds of the keyboard.
78 gfx::Rect keyboard_bounds_; 79 gfx::Rect keyboard_bounds_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(LockLayoutManager); 81 DISALLOW_COPY_AND_ASSIGN(LockLayoutManager);
81 }; 82 };
82 83
83 } // namespace ash 84 } // namespace ash
84 85
85 #endif // ASH_COMMON_WM_LOCK_LAYOUT_MANAGER_H_ 86 #endif // ASH_COMMON_WM_LOCK_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698