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

Unified Diff: ash/common/wm/lock_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ash/common/wm/lock_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/lock_layout_manager.h
diff --git a/ash/common/wm/lock_layout_manager.h b/ash/common/wm/lock_layout_manager.h
index 9ba7473d390c750a1e76a340ea26da62b2701457..c903018b6cdab55793bf70bf98b5a06062e87e0c 100644
--- a/ash/common/wm/lock_layout_manager.h
+++ b/ash/common/wm/lock_layout_manager.h
@@ -10,6 +10,7 @@
#include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
#include "ash/common/wm/wm_types.h"
#include "base/macros.h"
+#include "base/scoped_observer.h"
#include "ui/aura/window_observer.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/keyboard/keyboard_controller.h"
@@ -57,7 +58,8 @@ class ASH_EXPORT LockLayoutManager
const gfx::Rect& new_bounds) override;
// ShellObserver:
- void OnVirtualKeyboardStateChanged(bool activated) override;
+ void OnVirtualKeyboardStateChanged(bool activated,
+ WmWindow* root_window) override;
// keyboard::KeyboardControllerObserver overrides:
void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
@@ -71,8 +73,9 @@ class ASH_EXPORT LockLayoutManager
WmWindow* window_;
WmWindow* root_window_;
- // True is subscribed as keyboard controller observer.
- bool is_observing_keyboard_;
+ ScopedObserver<keyboard::KeyboardController,
+ keyboard::KeyboardControllerObserver>
+ keyboard_observer_;
// The bounds of the keyboard.
gfx::Rect keyboard_bounds_;
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ash/common/wm/lock_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698