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

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

Issue 2859363003: cros: Initial structure for views-based lock. (Closed)
Patch Set: Address comments Created 3 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
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 061bba949c63c4ff158f8f2f4afa7ef88bce4a3a..ad666c430e6de8eef217582e994dac5e35abd2f9 100644
--- a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc
@@ -151,7 +151,7 @@ void WebUIScreenLocker::LockScreen() {
gfx::Rect bounds = display::Screen::GetScreen()->GetPrimaryDisplay().bounds();
lock_time_ = base::TimeTicks::Now();
- lock_window_ = new LockWindow(this);
+ lock_window_ = new LockWindow();
lock_window_->AddObserver(this);
Init();
@@ -177,7 +177,7 @@ void WebUIScreenLocker::LockScreen() {
DisableKeyboardOverscroll();
}
-void WebUIScreenLocker::SetInputEnabled(bool enabled) {
+void WebUIScreenLocker::SetPasswordInputEnabled(bool enabled) {
login_display_->SetUIEnabled(enabled);
}
@@ -202,7 +202,7 @@ void WebUIScreenLocker::ScreenLockReady() {
UMA_HISTOGRAM_TIMES("LockScreen.LockReady",
base::TimeTicks::Now() - lock_time_);
screen_locker_->ScreenLockReady();
- SetInputEnabled(true);
+ SetPasswordInputEnabled(true);
}
void WebUIScreenLocker::OnLockWindowReady() {
@@ -266,11 +266,12 @@ void WebUIScreenLocker::OnAshLockAnimationFinished() {
"cr.ui.Oobe.animateOnceFullyDisplayed");
}
-void WebUIScreenLocker::SetFingerprintState(const AccountId& account_id,
- FingerprintState state) {
+void WebUIScreenLocker::SetFingerprintState(
+ const AccountId& account_id,
+ ScreenLocker::FingerprintState state) {
// TODO(xiaoyinh@): Modify JS side to consolidate removeUserPodFingerprintIcon
// and setUserPodFingerprintIcon into single JS function.
- if (state == FingerprintState::kRemoved) {
+ if (state == ScreenLocker::FingerprintState::kRemoved) {
GetWebUI()->CallJavascriptFunctionUnsafe(
"login.AccountPickerScreen.removeUserPodFingerprintIcon",
::login::MakeValue(account_id));
@@ -281,7 +282,7 @@ void WebUIScreenLocker::SetFingerprintState(const AccountId& account_id,
chromeos::quick_unlock::QuickUnlockFactory::GetForAccountId(account_id);
if (!quick_unlock_storage ||
!quick_unlock_storage->IsFingerprintAuthenticationAvailable()) {
- state = FingerprintState::kHidden;
+ state = ScreenLocker::FingerprintState::kHidden;
}
GetWebUI()->CallJavascriptFunctionUnsafe(
"login.AccountPickerScreen.setUserPodFingerprintIcon",
@@ -289,6 +290,10 @@ void WebUIScreenLocker::SetFingerprintState(const AccountId& account_id,
::login::MakeValue(static_cast<int>(state)));
}
+content::WebContents* WebUIScreenLocker::GetWebContents() {
+ return WebUILoginView::GetWebContents();
+}
+
////////////////////////////////////////////////////////////////////////////////
// WebUIScreenLocker, LoginDisplay::Delegate:

Powered by Google App Engine
This is Rietveld 408576698