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

Side by Side Diff: chrome/browser/chromeos/login/lock/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
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 17 matching lines...) Expand all
28 class WebContents; 28 class WebContents;
29 } 29 }
30 30
31 namespace chromeos { 31 namespace chromeos {
32 32
33 class Authenticator; 33 class Authenticator;
34 class ExtendedAuthenticator; 34 class ExtendedAuthenticator;
35 class AuthFailure; 35 class AuthFailure;
36 class ScreenlockIconProvider; 36 class ScreenlockIconProvider;
37 class WebUIScreenLocker; 37 class WebUIScreenLocker;
38 class ViewsScreenLocker;
38 39
39 namespace test { 40 namespace test {
40 class ScreenLockerTester; 41 class ScreenLockerTester;
41 class ScreenLockerViewsTester; 42 class ScreenLockerViewsTester;
42 class WebUIScreenLockerTester; 43 class WebUIScreenLockerTester;
43 } // namespace test 44 } // namespace test
44 45
45 // ScreenLocker creates a WebUIScreenLocker which will display the lock UI. 46 // ScreenLocker creates a WebUIScreenLocker which will display the lock UI.
46 // As well, it takes care of authenticating the user and managing a global 47 // As well, it takes care of authenticating the user and managing a global
47 // instance of itself which will be deleted when the system is unlocked. 48 // instance of itself which will be deleted when the system is unlocked.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 177
177 // Returns the tester 178 // Returns the tester
178 static test::ScreenLockerTester* GetTester(); 179 static test::ScreenLockerTester* GetTester();
179 180
180 private: 181 private:
181 friend class base::DeleteHelper<ScreenLocker>; 182 friend class base::DeleteHelper<ScreenLocker>;
182 friend class test::ScreenLockerTester; 183 friend class test::ScreenLockerTester;
183 friend class test::ScreenLockerViewsTester; 184 friend class test::ScreenLockerViewsTester;
184 friend class test::WebUIScreenLockerTester; 185 friend class test::WebUIScreenLockerTester;
185 friend class WebUIScreenLocker; 186 friend class WebUIScreenLocker;
187 friend class ViewsScreenLocker;
186 188
187 // Track whether the user used pin or password to unlock the lock screen. 189 // Track whether the user used pin or password to unlock the lock screen.
188 // Values corrospond to UMA histograms, do not modify, or add or delete other 190 // Values corrospond to UMA histograms, do not modify, or add or delete other
189 // than directly before AUTH_COUNT. 191 // than directly before AUTH_COUNT.
190 enum UnlockType { AUTH_PASSWORD = 0, AUTH_PIN, AUTH_FINGERPRINT, AUTH_COUNT }; 192 enum UnlockType { AUTH_PASSWORD = 0, AUTH_PIN, AUTH_FINGERPRINT, AUTH_COUNT };
191 193
192 struct AuthenticationParametersCapture { 194 struct AuthenticationParametersCapture {
193 UserContext user_context; 195 UserContext user_context;
194 }; 196 };
195 197
(...skipping 30 matching lines...) Expand all
226 // Callback to be invoked for ash start lock request. |locked| is true when 228 // Callback to be invoked for ash start lock request. |locked| is true when
227 // ash is fully locked and post lock animation finishes. Otherwise, the start 229 // ash is fully locked and post lock animation finishes. Otherwise, the start
228 // lock request is failed. 230 // lock request is failed.
229 void OnStartLockCallback(bool locked); 231 void OnStartLockCallback(bool locked);
230 232
231 // WebUIScreenLocker instance in use. 233 // WebUIScreenLocker instance in use.
232 std::unique_ptr<WebUIScreenLocker> web_ui_; 234 std::unique_ptr<WebUIScreenLocker> web_ui_;
233 235
234 // Delegate used to talk to the view. 236 // Delegate used to talk to the view.
235 Delegate* delegate_ = nullptr; 237 Delegate* delegate_ = nullptr;
236 bool owns_delegate_ = false;
237 238
238 // Users that can unlock the device. 239 // Users that can unlock the device.
239 user_manager::UserList users_; 240 user_manager::UserList users_;
240 241
241 // Used to authenticate the user to unlock. 242 // Used to authenticate the user to unlock.
242 scoped_refptr<Authenticator> authenticator_; 243 scoped_refptr<Authenticator> authenticator_;
243 244
244 // Used to authenticate the user to unlock supervised users. 245 // Used to authenticate the user to unlock supervised users.
245 scoped_refptr<ExtendedAuthenticator> extended_authenticator_; 246 scoped_refptr<ExtendedAuthenticator> extended_authenticator_;
246 247
(...skipping 26 matching lines...) Expand all
273 std::unique_ptr<AuthenticationParametersCapture> authentication_capture_; 274 std::unique_ptr<AuthenticationParametersCapture> authentication_capture_;
274 275
275 // Provider for button icon set by the screenlockPrivate API. 276 // Provider for button icon set by the screenlockPrivate API.
276 std::unique_ptr<ScreenlockIconProvider> screenlock_icon_provider_; 277 std::unique_ptr<ScreenlockIconProvider> screenlock_icon_provider_;
277 278
278 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_; 279 scoped_refptr<input_method::InputMethodManager::State> saved_ime_state_;
279 280
280 device::mojom::FingerprintPtr fp_service_; 281 device::mojom::FingerprintPtr fp_service_;
281 mojo::Binding<device::mojom::FingerprintObserver> binding_; 282 mojo::Binding<device::mojom::FingerprintObserver> binding_;
282 283
284 // ViewsScreenLocker instance in use.
285 std::unique_ptr<ViewsScreenLocker> views_screen_locker_;
286
283 base::WeakPtrFactory<ScreenLocker> weak_factory_; 287 base::WeakPtrFactory<ScreenLocker> weak_factory_;
284 288
285 DISALLOW_COPY_AND_ASSIGN(ScreenLocker); 289 DISALLOW_COPY_AND_ASSIGN(ScreenLocker);
286 }; 290 };
287 291
288 } // namespace chromeos 292 } // namespace chromeos
289 293
290 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_ 294 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOCK_SCREEN_LOCKER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/login/lock/screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698