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

Unified Diff: ash/login/lock_screen_controller.h

Issue 2896093003: cros: Make sure views-based lock screen is destroyed after it is dismissed. (Closed)
Patch Set: Address comments 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
« no previous file with comments | « no previous file | ash/login/lock_screen_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/login/lock_screen_controller.h
diff --git a/ash/login/lock_screen_controller.h b/ash/login/lock_screen_controller.h
index 6d01961d483f0df88742e287694a9feb4feb2b0e..efdfdb1f2147c158d35b64ab833ab9b4ba43aa88 100644
--- a/ash/login/lock_screen_controller.h
+++ b/ash/login/lock_screen_controller.h
@@ -20,6 +20,8 @@ namespace ash {
class ASH_EXPORT LockScreenController
: NON_EXPORTED_BASE(public mojom::LockScreen) {
public:
+ using OnShownCallback = base::OnceCallback<void(bool did_show)>;
+
LockScreenController();
~LockScreenController() override;
@@ -28,6 +30,7 @@ class ASH_EXPORT LockScreenController
// mojom::LockScreen:
void SetClient(mojom::LockScreenClientPtr client) override;
+ void ShowLockScreen(ShowLockScreenCallback callback) override;
void ShowErrorMessage(int32_t login_attempts,
const std::string& error_text,
const std::string& help_link_text,
@@ -47,18 +50,27 @@ class ASH_EXPORT LockScreenController
// LockScreenClient(chrome) will do the authentication and request to show
// error messages in the lock screen if auth fails, or request to clear
// errors if auth succeeds.
- void AuthenticateUser(const AccountId& account_id,
- const std::string& password,
- bool authenticated_by_pin);
+ void AuthenticateUser(
+ const AccountId& account_id,
+ const std::string& password,
+ bool authenticated_by_pin,
+ mojom::LockScreenClient::AuthenticateUserCallback callback);
void AttemptUnlock(const AccountId& account_id);
void HardlockPod(const AccountId& account_id);
void RecordClickOnLockIcon(const AccountId& account_id);
private:
- void DoAuthenticateUser(const AccountId& account_id,
- const std::string& password,
- bool authenticated_by_pin,
- const std::string& system_salt);
+ using PendingAuthenticateUserCall =
+ base::OnceCallback<void(const std::string& system_salt)>;
+
+ void DoAuthenticateUser(
+ const AccountId& account_id,
+ const std::string& password,
+ bool authenticated_by_pin,
+ mojom::LockScreenClient::AuthenticateUserCallback callback,
+ const std::string& system_salt);
+
+ void OnGetSystemSalt(const std::string& system_salt);
// Client interface in chrome browser. May be null in tests.
mojom::LockScreenClientPtr lock_screen_client_;
@@ -66,9 +78,12 @@ class ASH_EXPORT LockScreenController
// Bindings for the LockScreen interface.
mojo::BindingSet<mojom::LockScreen> bindings_;
+ // User authentication call that will run when we have system salt.
+ PendingAuthenticateUserCall pending_user_auth_;
+
DISALLOW_COPY_AND_ASSIGN(LockScreenController);
};
-} // namspace ash
+} // namespace ash
#endif // ASH_LOGIN_LOCK_SCREEN_CONTROLLER_H_
« no previous file with comments | « no previous file | ash/login/lock_screen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698