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

Unified Diff: chrome/browser/chromeos/login/lock/view_screen_locker.h

Issue 2903353003: Adding mojo calls for easy unlock service (Closed)
Patch Set: clean up and trybot 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/lock/view_screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/view_screen_locker.h b/chrome/browser/chromeos/login/lock/view_screen_locker.h
new file mode 100644
index 0000000000000000000000000000000000000000..4fa8247410046a9284d0880f5ffab93bcff35ab4
--- /dev/null
+++ b/chrome/browser/chromeos/login/lock/view_screen_locker.h
@@ -0,0 +1,63 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_
+
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/chromeos/login/lock/screen_locker.h"
+#include "chrome/browser/ui/ash/lock_screen_client.h"
+
+namespace chromeos {
+
+class UserSelectionScreen;
+
+// ViewScreenLocker helps ScreenLocker to call into the views-based lock screen
jdufault 2017/05/26 18:59:10 I think this comment is a little misleading, since
+// via mojo. and it also passes the requests from LockScreenClient to
+// UserSelectionScreen (to easy unlock service).
+class ViewScreenLocker : public LockScreenClient::Delegate,
jdufault 2017/05/26 18:59:10 If I understand correctly: LockScreenClient::De
xiaoyinh(OOO Sep 11-29) 2017/05/30 22:23:50 Thanks! Please let me know if the updated comment
+ public ScreenLocker::Delegate {
+ public:
+ ViewScreenLocker(ScreenLocker* screen_locker);
+ ~ViewScreenLocker() override;
+
+ // ScreenLocker::Delegate:
+ void SetPasswordInputEnabled(bool enabled) override;
+ void ShowErrorMessage(int error_msg_id,
+ HelpAppLauncher::HelpTopic help_topic_id) override;
+ void ClearErrors() override;
+ void AnimateAuthenticationSuccess() override;
+ void OnLockWebUIReady() override;
+ void OnLockBackgroundDisplayed() override;
+ void OnHeaderBarVisible() override;
+ void OnAshLockAnimationFinished() override;
+ void SetFingerprintState(const AccountId& account_id,
+ ScreenLocker::FingerprintState state) override;
+ content::WebContents* GetWebContents() override;
+
+ void Init();
+ void OnLockScreenReady();
+
+ private:
+ // LockScreenClient::Delegate
+ void HandleAttemptUnlock(const AccountId& account_id) override;
+ void HandleHardlockPod(const AccountId& account_id) override;
+ void HandleRecordClickOnLockIcon(const AccountId& account_id) override;
+
+ std::unique_ptr<UserSelectionScreen> user_selection_screen_;
+
+ // The ScreenLocker that owns this instance.
+ ScreenLocker* screen_locker_ = nullptr;
+
+ // Time when lock was initiated, required for metrics.
+ base::TimeTicks lock_time_;
+
+ base::WeakPtrFactory<ViewScreenLocker> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ViewScreenLocker);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_

Powered by Google App Engine
This is Rietveld 408576698