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

Unified Diff: chrome/browser/chromeos/login/lock/webui_screen_locker.h

Issue 304153004: Center lock screen user pod when virtual keyboard is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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 | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/chromeos/login/lock/webui_screen_locker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/lock/webui_screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/webui_screen_locker.h b/chrome/browser/chromeos/login/lock/webui_screen_locker.h
index 4fe9dcb7996d3c02998a6814b4f8a9cc930359bc..716612be8070beb3b58911b3251ab4ab8625bc5d 100644
--- a/chrome/browser/chromeos/login/lock/webui_screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.h
@@ -7,6 +7,7 @@
#include <string>
+#include "ash/shell_delegate.h"
#include "ash/wm/lock_state_observer.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -19,6 +20,7 @@
#include "chromeos/dbus/power_manager_client.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
+#include "ui/keyboard/keyboard_controller_observer.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
@@ -28,6 +30,7 @@ class WebUI;
namespace chromeos {
+class OobeUI;
class ScreenLocker;
class WebUILoginDisplay;
@@ -47,7 +50,9 @@ class WebUIScreenLocker : public WebUILoginView,
public LockWindow::Observer,
public ash::LockStateObserver,
public views::WidgetObserver,
- public PowerManagerClient::Observer {
+ public PowerManagerClient::Observer,
+ public ash::VirtualKeyboardStateObserver,
+ public keyboard::KeyboardControllerObserver {
public:
explicit WebUIScreenLocker(ScreenLocker* screen_locker);
@@ -113,6 +118,15 @@ class WebUIScreenLocker : public WebUILoginView,
// Overridden from content::WebContentsObserver:
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
+ // Overridden from ash::KeyboardStateObserver:
+ virtual void OnVirtualKeyboardStateChanged(bool activated) OVERRIDE;
+
+ // Overridden from keyboard::KeyboardControllerObserver:
+ virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE;
+
+ // Returns instance of the OOBE WebUI.
+ OobeUI* GetOobeUI();
+
private:
friend class test::WebUIScreenLockerTester;
@@ -141,6 +155,12 @@ class WebUIScreenLocker : public WebUILoginView,
scoped_ptr<login::NetworkStateHelper> network_state_helper_;
+ // True is subscribed as keyboard controller observer.
+ bool is_observing_keyboard_;
+
+ // The bounds of the virtual keyboard.
+ gfx::Rect keyboard_bounds_;
+
base::WeakPtrFactory<WebUIScreenLocker> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(WebUIScreenLocker);
« no previous file with comments | « chrome/browser/chromeos/login/helper.cc ('k') | chrome/browser/chromeos/login/lock/webui_screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698