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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(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 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
17 // via mojo. and it also passes the requests from LockScreenClient to
18 // UserSelectionScreen (to easy unlock service).
19 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
20 public ScreenLocker::Delegate {
21 public:
22 ViewScreenLocker(ScreenLocker* screen_locker);
23 ~ViewScreenLocker() override;
24
25 // ScreenLocker::Delegate:
26 void SetPasswordInputEnabled(bool enabled) override;
27 void ShowErrorMessage(int error_msg_id,
28 HelpAppLauncher::HelpTopic help_topic_id) override;
29 void ClearErrors() override;
30 void AnimateAuthenticationSuccess() override;
31 void OnLockWebUIReady() override;
32 void OnLockBackgroundDisplayed() override;
33 void OnHeaderBarVisible() override;
34 void OnAshLockAnimationFinished() override;
35 void SetFingerprintState(const AccountId& account_id,
36 ScreenLocker::FingerprintState state) override;
37 content::WebContents* GetWebContents() override;
38
39 void Init();
40 void OnLockScreenReady();
41
42 private:
43 // LockScreenClient::Delegate
44 void HandleAttemptUnlock(const AccountId& account_id) override;
45 void HandleHardlockPod(const AccountId& account_id) override;
46 void HandleRecordClickOnLockIcon(const AccountId& account_id) override;
47
48 std::unique_ptr<UserSelectionScreen> user_selection_screen_;
49
50 // The ScreenLocker that owns this instance.
51 ScreenLocker* screen_locker_ = nullptr;
52
53 // Time when lock was initiated, required for metrics.
54 base::TimeTicks lock_time_;
55
56 base::WeakPtrFactory<ViewScreenLocker> weak_factory_;
57
58 DISALLOW_COPY_AND_ASSIGN(ViewScreenLocker);
59 };
60
61 } // namespace chromeos
62
63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEW_SCREEN_LOCKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698