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

Side by Side Diff: chrome/browser/chromeos/login/lock/views_screen_locker.h

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 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_VIEWS_SCREEN_LOCKER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEWS_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 class UserSelectionScreenProxy;
16
17 // ViewsScreenLocker acts like LockScreenClient::Delegate which handles method
18 // calls coming from ash into chrome.
19 // It is also a ScreenLocker::Delegate which handles calls from chrome into
20 // ash (views-based lockscreen).
21 class ViewsScreenLocker : public LockScreenClient::Delegate,
22 public ScreenLocker::Delegate {
23 public:
24 explicit ViewsScreenLocker(ScreenLocker* screen_locker);
25 ~ViewsScreenLocker() override;
26
27 // ScreenLocker::Delegate:
28 void SetPasswordInputEnabled(bool enabled) override;
29 void ShowErrorMessage(int error_msg_id,
30 HelpAppLauncher::HelpTopic help_topic_id) override;
31 void ClearErrors() override;
32 void AnimateAuthenticationSuccess() override;
33 void OnLockWebUIReady() override;
34 void OnLockBackgroundDisplayed() override;
35 void OnHeaderBarVisible() override;
36 void OnAshLockAnimationFinished() override;
37 void SetFingerprintState(const AccountId& account_id,
38 ScreenLocker::FingerprintState state) override;
39 content::WebContents* GetWebContents() override;
40
41 void Init();
42 void OnLockScreenReady();
43
44 private:
45 // LockScreenClient::Delegate
46 void HandleAttemptUnlock(const AccountId& account_id) override;
47 void HandleHardlockPod(const AccountId& account_id) override;
48 void HandleRecordClickOnLockIcon(const AccountId& account_id) override;
49
50 std::unique_ptr<UserSelectionScreenProxy> user_selection_screen_proxy_;
51 std::unique_ptr<UserSelectionScreen> user_selection_screen_;
52
53 // The ScreenLocker that owns this instance.
54 ScreenLocker* const screen_locker_ = nullptr;
55
56 // Time when lock was initiated, required for metrics.
57 base::TimeTicks lock_time_;
58
59 base::WeakPtrFactory<ViewsScreenLocker> weak_factory_;
60
61 DISALLOW_COPY_AND_ASSIGN(ViewsScreenLocker);
62 };
63
64 } // namespace chromeos
65
66 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_VIEWS_SCREEN_LOCKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.cc ('k') | chrome/browser/chromeos/login/lock/views_screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698