Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_ | |
| 7 | |
| 8 #include "base/memory/weak_ptr.h" | |
| 9 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | |
| 10 #include "chrome/browser/ui/ash/lock_screen_client.h" | |
| 11 | |
| 12 namespace chromeos { | |
| 13 | |
| 14 class UserSelectionScreen; | |
| 15 | |
| 16 // ViewScreenLocker acts like LockScreenClient::Delegate which handles method | |
| 17 // calls coming from ash into chrome. | |
| 18 // It is also a ScreenLocker::Delegate which handles calls from chrome into | |
| 19 // ash (views-based lockscreen). | |
| 20 class ViewScreenLocker : public LockScreenClient::Delegate, | |
|
xiyuan
2017/05/31 17:51:18
nit: ViewScreenLocker -> ViewsScreenLocker if the
xiaoyinh(OOO Sep 11-29)
2017/06/02 23:42:29
Done.
| |
| 21 public ScreenLocker::Delegate { | |
| 22 public: | |
| 23 ViewScreenLocker(ScreenLocker* screen_locker); | |
|
xiyuan
2017/05/31 17:51:18
nit: explicit
Use "explicit" keyword for single a
xiaoyinh(OOO Sep 11-29)
2017/06/02 23:42:29
Thanks for the information. Done.
| |
| 24 ~ViewScreenLocker() override; | |
| 25 | |
| 26 // ScreenLocker::Delegate: | |
| 27 void SetPasswordInputEnabled(bool enabled) override; | |
| 28 void ShowErrorMessage(int error_msg_id, | |
| 29 HelpAppLauncher::HelpTopic help_topic_id) override; | |
| 30 void ClearErrors() override; | |
| 31 void AnimateAuthenticationSuccess() override; | |
| 32 void OnLockWebUIReady() override; | |
| 33 void OnLockBackgroundDisplayed() override; | |
| 34 void OnHeaderBarVisible() override; | |
| 35 void OnAshLockAnimationFinished() override; | |
| 36 void SetFingerprintState(const AccountId& account_id, | |
| 37 ScreenLocker::FingerprintState state) override; | |
| 38 content::WebContents* GetWebContents() override; | |
| 39 | |
| 40 void Init(); | |
| 41 void OnLockScreenReady(); | |
| 42 | |
| 43 private: | |
| 44 // LockScreenClient::Delegate | |
| 45 void HandleAttemptUnlock(const AccountId& account_id) override; | |
| 46 void HandleHardlockPod(const AccountId& account_id) override; | |
| 47 void HandleRecordClickOnLockIcon(const AccountId& account_id) override; | |
| 48 | |
| 49 std::unique_ptr<UserSelectionScreen> user_selection_screen_; | |
| 50 | |
| 51 // The ScreenLocker that owns this instance. | |
| 52 ScreenLocker* screen_locker_ = nullptr; | |
|
xiyuan
2017/05/31 17:51:18
nit: ScreenLocker* const screen_locker_;
since |s
xiaoyinh(OOO Sep 11-29)
2017/06/02 23:42:29
Done.
| |
| 53 | |
| 54 // Time when lock was initiated, required for metrics. | |
| 55 base::TimeTicks lock_time_; | |
| 56 | |
| 57 base::WeakPtrFactory<ViewScreenLocker> weak_factory_; | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(ViewScreenLocker); | |
| 60 }; | |
| 61 | |
| 62 } // namespace chromeos | |
| 63 | |
| 64 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_ | |
| OLD | NEW |