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

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

Issue 2937553002: Create Mojo Struct for user information used in login/lock screen. (Closed)
Patch Set: rebase Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/views_screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/views_screen_locker.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 base::Unretained(this))); 45 base::Unretained(this)));
46 } 46 }
47 47
48 ViewsScreenLocker::~ViewsScreenLocker() { 48 ViewsScreenLocker::~ViewsScreenLocker() {
49 LockScreenClient::Get()->SetDelegate(nullptr); 49 LockScreenClient::Get()->SetDelegate(nullptr);
50 } 50 }
51 51
52 void ViewsScreenLocker::Init() { 52 void ViewsScreenLocker::Init() {
53 lock_time_ = base::TimeTicks::Now(); 53 lock_time_ = base::TimeTicks::Now();
54 user_selection_screen_->Init(screen_locker_->users()); 54 user_selection_screen_->Init(screen_locker_->users());
55 LockScreenClient::Get()->LoadUsers(user_selection_screen_->PrepareUserList(), 55 LockScreenClient::Get()->LoadUsers(
56 false /* show_guests */); 56 user_selection_screen_->UpdateAndReturnUserListForMojo(),
57 false /* show_guests */);
57 if (!ime_state_.get()) 58 if (!ime_state_.get())
58 ime_state_ = input_method::InputMethodManager::Get()->GetActiveIMEState(); 59 ime_state_ = input_method::InputMethodManager::Get()->GetActiveIMEState();
59 60
60 // Reset Caps Lock state when lock screen is shown. 61 // Reset Caps Lock state when lock screen is shown.
61 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetCapsLockEnabled( 62 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetCapsLockEnabled(
62 false); 63 false);
63 64
64 // Enable pin for any users who can use it. 65 // Enable pin for any users who can use it.
65 if (user_manager::UserManager::IsInitialized()) { 66 if (user_manager::UserManager::IsInitialized()) {
66 for (user_manager::User* user : 67 for (user_manager::User* user :
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 if (focused_pod_account_id_) { 223 if (focused_pod_account_id_) {
223 std::string user_input_method = lock_screen_utils::GetUserLastInputMethod( 224 std::string user_input_method = lock_screen_utils::GetUserLastInputMethod(
224 focused_pod_account_id_->GetUserEmail()); 225 focused_pod_account_id_->GetUserEmail());
225 lock_screen_utils::EnforcePolicyInputMethods(user_input_method); 226 lock_screen_utils::EnforcePolicyInputMethods(user_input_method);
226 } else { 227 } else {
227 lock_screen_utils::EnforcePolicyInputMethods(std::string()); 228 lock_screen_utils::EnforcePolicyInputMethods(std::string());
228 } 229 }
229 } 230 }
230 231
231 } // namespace chromeos 232 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698