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

Unified Diff: chrome/browser/ui/ash/lock_screen_client.cc

Issue 2903353003: Adding mojo calls for easy unlock service (Closed)
Patch Set: comments and 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 side-by-side diff with in-line comments
Download patch
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..d1f537d0147eac4eb002b5ff229e3b0565856e3f 100644
--- a/chrome/browser/ui/ash/lock_screen_client.cc
+++ b/chrome/browser/ui/ash/lock_screen_client.cc
@@ -13,6 +13,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 +50,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 +79,28 @@ void LockScreenClient::ShowErrorMessage(int32_t login_attempts,
void LockScreenClient::ClearErrors() {
lock_screen_->ClearErrors();
}
+
+void LockScreenClient::ShowUserPodCustomIcon(
+ const AccountId& account_id,
+ ash::mojom::UserPodCustomIconOptionsPtr icon) {
+ lock_screen_->ShowUserPodCustomIcon(account_id, std::move(icon));
+}
+
+void LockScreenClient::HideUserPodCustomIcon(const AccountId& account_id) {
+ lock_screen_->HideUserPodCustomIcon(account_id);
+}
+
+void LockScreenClient::SetAuthType(const AccountId& account_id,
+ ash::mojom::AuthType auth_type,
+ const base::string16& initial_value) {
+ lock_screen_->SetAuthType(account_id, auth_type, initial_value);
+}
+
+void LockScreenClient::LoadUsers(std::unique_ptr<base::ListValue> users_list,
+ bool show_guest) {
+ lock_screen_->LoadUsers(std::move(users_list), show_guest);
+}
+
+void LockScreenClient::SetDelegate(Delegate* delegate) {
+ delegate_ = delegate;
+}
« no previous file with comments | « chrome/browser/ui/ash/lock_screen_client.h ('k') | chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698