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 ASH_LOGIN_LOCK_SCREEN_CONTROLLER_H_ | |
6 #define ASH_LOGIN_LOCK_SCREEN_CONTROLLER_H_ | |
7 | |
8 #include "ash/ash_export.h" | |
9 #include "ash/public/interfaces/lock_screen.mojom.h" | |
10 #include "base/macros.h" | |
11 #include "mojo/public/cpp/bindings/binding_set.h" | |
12 | |
13 namespace ash { | |
14 | |
15 class ASH_EXPORT LockScreenController | |
James Cook
2017/05/15 21:15:00
Class documentation please.
xiaoyinh(OOO Sep 11-29)
2017/05/16 17:32:50
Done.
| |
16 : NON_EXPORTED_BASE(public mojom::LockScreen) { | |
17 public: | |
18 LockScreenController(); | |
19 ~LockScreenController() override; | |
20 | |
21 // Binds the mojom::LockScreen interface to this object. | |
22 void BindRequest(mojom::LockScreenRequest request); | |
23 | |
24 // mojom::LockScreen: | |
25 void SetClient(mojom::LockScreenClientPtr client) override; | |
26 void ShowErrorMessage() override; | |
27 void ClearErrors() override; | |
28 | |
29 void AuthenticateUser(const AccountId& account_id, | |
James Cook
2017/05/15 21:15:00
Document what this does. For example, how does it
xiaoyinh(OOO Sep 11-29)
2017/05/16 17:32:50
Done.
| |
30 const std::string& password, | |
31 bool authenticated_by_pin); | |
32 | |
33 private: | |
34 void DoAuthenticateUser(const AccountId& account_id, | |
35 const std::string& password, | |
36 bool authenticated_by_pin, | |
37 const std::string& system_salt); | |
38 | |
39 void OnSaltObtained(const std::string& system_salt); | |
40 | |
41 // Client interface in chrome browser. May be null in tests. | |
42 mojom::LockScreenClientPtr lock_screen_client_; | |
43 | |
44 // Bindings for the LockScreen interface. | |
45 mojo::BindingSet<mojom::LockScreen> bindings_; | |
46 std::string system_salt_; | |
47 | |
48 DISALLOW_COPY_AND_ASSIGN(LockScreenController); | |
49 }; | |
50 | |
51 } // namspace ash | |
52 | |
53 #endif // ASH_LOGIN_LOCK_SCREEN_CONTROLLER_H_ | |
OLD | NEW |