Index: chrome/browser/chromeos/login/lock/webui_screen_locker.cc |
diff --git a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc |
index d0876ee84382aece9ad290718da4cb8a716c409e..7d0f5cde14c969b02815940a687f6fdcd5617623 100644 |
--- a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc |
+++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc |
@@ -67,15 +67,16 @@ WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker) |
is_observing_keyboard_(false), |
weak_factory_(this) { |
set_should_emit_login_prompt_visible(false); |
+#if !defined(USE_ATHENA) |
ash::Shell::GetInstance()->lock_state_controller()->AddObserver(this); |
+ ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); |
Jun Mukai
2014/10/13 18:20:24
Athena also has virtual keyboards. Do we need sim
oshima
2014/10/13 18:52:20
I believe it's just observing the bounds change.
Dmitry Polukhin
2014/10/14 11:20:34
Yes, it looks like for now there is nothing to do
Jun Mukai
2014/10/14 18:27:25
Ah, okay, and it's already observing in Athena so
|
+#endif |
DBusThreadManager::Get()->GetPowerManagerClient()->AddObserver(this); |
if (keyboard::KeyboardController::GetInstance()) { |
keyboard::KeyboardController::GetInstance()->AddObserver(this); |
is_observing_keyboard_ = true; |
} |
- |
- ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); |
} |
void WebUIScreenLocker::LockScreen() { |
@@ -89,6 +90,7 @@ void WebUIScreenLocker::LockScreen() { |
lock_window_->AddObserver(this); |
WebUILoginView::Init(); |
lock_window_->SetContentsView(this); |
+ lock_window_->SetBounds(bounds); |
lock_window_->Show(); |
LoadURL(GURL(kLoginURL)); |
lock_window->Grab(); |
@@ -156,8 +158,13 @@ void WebUIScreenLocker::FocusUserPod() { |
WebUIScreenLocker::~WebUIScreenLocker() { |
DBusThreadManager::Get()->GetPowerManagerClient()->RemoveObserver(this); |
+#if !defined(USE_ATHENA) |
ash::Shell::GetInstance()-> |
lock_state_controller()->RemoveObserver(this); |
+ |
+ ash::Shell::GetInstance()->delegate()-> |
+ RemoveVirtualKeyboardStateObserver(this); |
+#endif |
// In case of shutdown, lock_window_ may be deleted before WebUIScreenLocker. |
if (lock_window_) { |
lock_window_->RemoveObserver(this); |
@@ -175,9 +182,6 @@ WebUIScreenLocker::~WebUIScreenLocker() { |
is_observing_keyboard_ = false; |
} |
- ash::Shell::GetInstance()->delegate()-> |
- RemoveVirtualKeyboardStateObserver(this); |
- |
if (login::LoginScrollIntoViewEnabled()) |
ResetKeyboardOverscrollOverride(); |
} |