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

Side by Side Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

Issue 2867173003: cros: Move LockWindow from chrome to ash (Closed)
Patch Set: Reorder patches so view -> ui lands first 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 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 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/login/ui/lock_screen.h" 10 #include "ash/login/ui/lock_screen.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 235
236 authenticator_ = UserSessionManager::GetInstance()->CreateAuthenticator(this); 236 authenticator_ = UserSessionManager::GetInstance()->CreateAuthenticator(this);
237 extended_authenticator_ = ExtendedAuthenticator::Create(this); 237 extended_authenticator_ = ExtendedAuthenticator::Create(this);
238 if (IsUsingMdLogin()) { 238 if (IsUsingMdLogin()) {
239 // Create delegate that will eventually call into the views-based lock 239 // Create delegate that will eventually call into the views-based lock
240 // screen via mojo. 240 // screen via mojo.
241 delegate_ = new StubDelegate(); 241 delegate_ = new StubDelegate();
242 owns_delegate_ = true; 242 owns_delegate_ = true;
243 243
244 // Create and display lock screen. 244 // Create and display lock screen.
245 // TODO(jdufualt): LockWindow should live in ash.
246 // TODO(jdufault): Calling ash::ShowLockScreenInWidget should be a mojo 245 // TODO(jdufault): Calling ash::ShowLockScreenInWidget should be a mojo
247 // call. We should only set the session state to locked after the mojo call 246 // call. We should only set the session state to locked after the mojo call
248 // has completed. 247 // has completed.
249 LockWindow* lock_window = new LockWindow(); 248 if (ash::ShowLockScreen()) {
250 lock_window->SetBounds( 249 session_manager::SessionManager::Get()->SetSessionState(
251 display::Screen::GetScreen()->GetPrimaryDisplay().bounds()); 250 session_manager::SessionState::LOCKED);
252 ash::ShowLockScreenInWidget(lock_window); 251 }
253 session_manager::SessionManager::Get()->SetSessionState(
254 session_manager::SessionState::LOCKED);
255 } else { 252 } else {
256 web_ui_.reset(new WebUIScreenLocker(this)); 253 web_ui_.reset(new WebUIScreenLocker(this));
257 delegate_ = web_ui_.get(); 254 delegate_ = web_ui_.get();
258 owns_delegate_ = false; 255 owns_delegate_ = false;
259 web_ui_->LockScreen(); 256 web_ui_->LockScreen();
260 257
261 // Ownership of |icon_image_source| is passed. 258 // Ownership of |icon_image_source| is passed.
262 screenlock_icon_provider_ = base::MakeUnique<ScreenlockIconProvider>(); 259 screenlock_icon_provider_ = base::MakeUnique<ScreenlockIconProvider>();
263 ScreenlockIconSource* screenlock_icon_source = 260 ScreenlockIconSource* screenlock_icon_source =
264 new ScreenlockIconSource(screenlock_icon_provider_->AsWeakPtr()); 261 new ScreenlockIconSource(screenlock_icon_provider_->AsWeakPtr());
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 716 }
720 } 717 }
721 718
722 if (auth_status_consumer_) { 719 if (auth_status_consumer_) {
723 AuthFailure failure(AuthFailure::UNLOCK_FAILED); 720 AuthFailure failure(AuthFailure::UNLOCK_FAILED);
724 auth_status_consumer_->OnAuthFailure(failure); 721 auth_status_consumer_->OnAuthFailure(failure);
725 } 722 }
726 } 723 }
727 724
728 } // namespace chromeos 725 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/lock/webui_screen_locker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698