| Index: chrome/browser/ui/ash/lock_screen_client.cc
|
| diff --git a/chrome/browser/ui/ash/lock_screen_client.cc b/chrome/browser/ui/ash/lock_screen_client.cc
|
| index 9d381c9239df2f98c79510deac16901b37868ab5..37a8e6b7b1770f835e7ce19cf5941a34b21bd88b 100644
|
| --- a/chrome/browser/ui/ash/lock_screen_client.cc
|
| +++ b/chrome/browser/ui/ash/lock_screen_client.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/ui/ash/lock_screen_client.h"
|
|
|
| #include "ash/public/interfaces/constants.mojom.h"
|
| +#include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/chromeos/login/lock/screen_locker.h"
|
| #include "content/public/common/service_manager_connection.h"
|
| #include "services/service_manager/public/cpp/connector.h"
|
| @@ -13,6 +14,9 @@ namespace {
|
| LockScreenClient* g_instance = nullptr;
|
| } // namespace
|
|
|
| +LockScreenClient::Delegate::Delegate() = default;
|
| +LockScreenClient::Delegate::~Delegate() = default;
|
| +
|
| LockScreenClient::LockScreenClient() : binding_(this) {
|
| content::ServiceManagerConnection::GetForProcess()
|
| ->GetConnector()
|
| @@ -47,6 +51,24 @@ void LockScreenClient::AuthenticateUser(const AccountId& account_id,
|
| chromeos::ScreenLocker::default_screen_locker()->Authenticate(user_context);
|
| }
|
|
|
| +void LockScreenClient::AttemptUnlock(const AccountId& account_id) {
|
| + if (!delegate_)
|
| + return;
|
| + delegate_->HandleAttemptUnlock(account_id);
|
| +}
|
| +
|
| +void LockScreenClient::HardlockPod(const AccountId& account_id) {
|
| + if (!delegate_)
|
| + return;
|
| + delegate_->HandleHardlockPod(account_id);
|
| +}
|
| +
|
| +void LockScreenClient::RecordClickOnLockIcon(const AccountId& account_id) {
|
| + if (!delegate_)
|
| + return;
|
| + delegate_->HandleRecordClickOnLockIcon(account_id);
|
| +}
|
| +
|
| void LockScreenClient::ShowErrorMessage(int32_t login_attempts,
|
| const std::string& error_text,
|
| const std::string& help_link_text,
|
| @@ -58,3 +80,35 @@ void LockScreenClient::ShowErrorMessage(int32_t login_attempts,
|
| void LockScreenClient::ClearErrors() {
|
| lock_screen_->ClearErrors();
|
| }
|
| +
|
| +void LockScreenClient::LoadUsers(const base::ListValue& users_list,
|
| + bool show_guest) {
|
| + lock_screen_->LoadUsers(base::MakeUnique<base::ListValue>(users_list),
|
| + show_guest);
|
| +}
|
| +
|
| +void LockScreenClient::SetDelegate(Delegate* delegate) {
|
| + delegate_ = delegate;
|
| +}
|
| +
|
| +void LockScreenClient::ShowUserPodCustomIcon(
|
| + const AccountId& account_id,
|
| + const base::DictionaryValue& icon) {
|
| + lock_screen_->ShowUserPodCustomIcon(
|
| + account_id, base::MakeUnique<base::DictionaryValue>(icon));
|
| +}
|
| +void LockScreenClient::HideUserPodCustomIcon(const AccountId& account_id) {
|
| + lock_screen_->HideUserPodCustomIcon(account_id);
|
| +}
|
| +
|
| +void LockScreenClient::SetAuthType(
|
| + const AccountId& account_id,
|
| + proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type,
|
| + const base::string16& initial_value) {
|
| + lock_screen_->SetAuthType(account_id, static_cast<int>(auth_type),
|
| + base::UTF16ToUTF8(initial_value));
|
| +}
|
| +
|
| +base::WeakPtr<chromeos::UserBoardView> LockScreenClient::GetWeakPtr() {
|
| + return base::WeakPtr<chromeos::UserBoardView>();
|
| +}
|
|
|