OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Public sessions are always shown. | 178 // Public sessions are always shown. |
179 virtual bool IsShowUsers() const = 0; | 179 virtual bool IsShowUsers() const = 0; |
180 | 180 |
181 // Whether user sign in has completed. | 181 // Whether user sign in has completed. |
182 virtual bool IsUserSigninCompleted() const = 0; | 182 virtual bool IsUserSigninCompleted() const = 0; |
183 | 183 |
184 // Request to (re)load user list. | 184 // Request to (re)load user list. |
185 virtual void HandleGetUsers() = 0; | 185 virtual void HandleGetUsers() = 0; |
186 | 186 |
187 // Runs an OAuth token validation check for user. | 187 // Runs an OAuth token validation check for user. |
188 virtual void CheckUserStatus(const AccountId& account_id) = 0; | 188 virtual void CheckUserStatus(const std::string& user_id) = 0; |
189 | 189 |
190 // Returns true if user is allowed to log in by domain policy. | 190 // Returns true if user is allowed to log in by domain policy. |
191 virtual bool IsUserWhitelisted(const std::string& user_id) = 0; | 191 virtual bool IsUserWhitelisted(const std::string& user_id) = 0; |
192 | 192 |
193 protected: | 193 protected: |
194 virtual ~SigninScreenHandlerDelegate() {} | 194 virtual ~SigninScreenHandlerDelegate() {} |
195 }; | 195 }; |
196 | 196 |
197 // A class that handles the WebUI hooks in sign-in screen in OobeDisplay | 197 // A class that handles the WebUI hooks in sign-in screen in OobeDisplay |
198 // and LoginDisplay. | 198 // and LoginDisplay. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 void OnMaximizeModeStarted() override; | 312 void OnMaximizeModeStarted() override; |
313 void OnMaximizeModeEnded() override; | 313 void OnMaximizeModeEnded() override; |
314 | 314 |
315 void UpdateAddButtonStatus(); | 315 void UpdateAddButtonStatus(); |
316 | 316 |
317 // Restore input focus to current user pod. | 317 // Restore input focus to current user pod. |
318 void RefocusCurrentPod(); | 318 void RefocusCurrentPod(); |
319 | 319 |
320 // WebUI message handlers. | 320 // WebUI message handlers. |
321 void HandleGetUsers(); | 321 void HandleGetUsers(); |
322 void HandleAuthenticateUser(const AccountId& account_id, | 322 void HandleAuthenticateUser(const std::string& username, |
323 const std::string& password); | 323 const std::string& password); |
324 void HandleAttemptUnlock(const std::string& username); | 324 void HandleAttemptUnlock(const std::string& username); |
325 void HandleLaunchIncognito(); | 325 void HandleLaunchIncognito(); |
326 void HandleLaunchPublicSession(const AccountId& account_id, | 326 void HandleLaunchPublicSession(const std::string& user_id, |
327 const std::string& locale, | 327 const std::string& locale, |
328 const std::string& input_method); | 328 const std::string& input_method); |
329 void HandleOfflineLogin(const base::ListValue* args); | 329 void HandleOfflineLogin(const base::ListValue* args); |
330 void HandleShutdownSystem(); | 330 void HandleShutdownSystem(); |
331 void HandleLoadWallpaper(const AccountId& account_id); | 331 void HandleLoadWallpaper(const std::string& email); |
332 void HandleRebootSystem(); | 332 void HandleRebootSystem(); |
333 void HandleRemoveUser(const AccountId& account_id); | 333 void HandleRemoveUser(const std::string& email); |
334 void HandleShowAddUser(const base::ListValue* args); | 334 void HandleShowAddUser(const base::ListValue* args); |
335 void HandleToggleEnrollmentScreen(); | 335 void HandleToggleEnrollmentScreen(); |
336 void HandleToggleEnableDebuggingScreen(); | 336 void HandleToggleEnableDebuggingScreen(); |
337 void HandleToggleKioskEnableScreen(); | 337 void HandleToggleKioskEnableScreen(); |
338 void HandleToggleResetScreen(); | 338 void HandleToggleResetScreen(); |
339 void HandleToggleKioskAutolaunchScreen(); | 339 void HandleToggleKioskAutolaunchScreen(); |
340 void HandleAccountPickerReady(); | 340 void HandleAccountPickerReady(); |
341 void HandleWallpaperReady(); | 341 void HandleWallpaperReady(); |
342 void HandleSignOutUser(); | 342 void HandleSignOutUser(); |
343 void HandleOpenProxySettings(); | 343 void HandleOpenProxySettings(); |
344 void HandleLoginVisible(const std::string& source); | 344 void HandleLoginVisible(const std::string& source); |
345 void HandleCancelPasswordChangedFlow(const AccountId& account_id); | 345 void HandleCancelPasswordChangedFlow(const std::string& user_id); |
346 void HandleCancelUserAdding(); | 346 void HandleCancelUserAdding(); |
347 void HandleMigrateUserData(const std::string& password); | 347 void HandleMigrateUserData(const std::string& password); |
348 void HandleResyncUserData(); | 348 void HandleResyncUserData(); |
349 void HandleLoginUIStateChanged(const std::string& source, bool active); | 349 void HandleLoginUIStateChanged(const std::string& source, bool active); |
350 void HandleUnlockOnLoginSuccess(); | 350 void HandleUnlockOnLoginSuccess(); |
351 void HandleLoginScreenUpdate(); | 351 void HandleLoginScreenUpdate(); |
352 void HandleShowLoadingTimeoutError(); | 352 void HandleShowLoadingTimeoutError(); |
353 void HandleShowSupervisedUserCreationScreen(); | 353 void HandleShowSupervisedUserCreationScreen(); |
354 void HandleFocusPod(const AccountId& account_id); | 354 void HandleFocusPod(const std::string& user_id); |
355 void HandleHardlockPod(const std::string& user_id); | 355 void HandleHardlockPod(const std::string& user_id); |
356 void HandleLaunchKioskApp(const AccountId& app_account_id, | 356 void HandleLaunchKioskApp(const std::string& app_id, bool diagnostic_mode); |
357 bool diagnostic_mode); | 357 void HandleGetPublicSessionKeyboardLayouts(const std::string& user_id, |
358 void HandleGetPublicSessionKeyboardLayouts(const AccountId& account_id, | |
359 const std::string& locale); | 358 const std::string& locale); |
360 void HandleCancelConsumerManagementEnrollment(); | 359 void HandleCancelConsumerManagementEnrollment(); |
361 void HandleGetTouchViewState(); | 360 void HandleGetTouchViewState(); |
362 void HandleLogRemoveUserWarningShown(); | 361 void HandleLogRemoveUserWarningShown(); |
363 void HandleFirstIncorrectPasswordAttempt(const AccountId& account_id); | 362 void HandleFirstIncorrectPasswordAttempt(const std::string& email); |
364 void HandleMaxIncorrectPasswordAttempts(const AccountId& account_id); | 363 void HandleMaxIncorrectPasswordAttempts(const std::string& email); |
365 | 364 |
366 // Sends the list of |keyboard_layouts| available for the |locale| that is | 365 // Sends the list of |keyboard_layouts| available for the |locale| that is |
367 // currently selected for the public session identified by |user_id|. | 366 // currently selected for the public session identified by |user_id|. |
368 void SendPublicSessionKeyboardLayouts( | 367 void SendPublicSessionKeyboardLayouts( |
369 const AccountId& account_id, | 368 const std::string& user_id, |
370 const std::string& locale, | 369 const std::string& locale, |
371 scoped_ptr<base::ListValue> keyboard_layouts); | 370 scoped_ptr<base::ListValue> keyboard_layouts); |
372 | 371 |
373 // Returns true iff | 372 // Returns true iff |
374 // (i) log in is restricted to some user list, | 373 // (i) log in is restricted to some user list, |
375 // (ii) all users in the restricted list are present. | 374 // (ii) all users in the restricted list are present. |
376 bool AllWhitelistedUsersPresent(); | 375 bool AllWhitelistedUsersPresent(); |
377 | 376 |
378 // Cancels password changed flow - switches back to login screen. | 377 // Cancels password changed flow - switches back to login screen. |
379 // Called as a callback after cookies are cleared. | 378 // Called as a callback after cookies are cleared. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; | 487 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; |
489 | 488 |
490 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; | 489 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
491 | 490 |
492 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 491 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
493 }; | 492 }; |
494 | 493 |
495 } // namespace chromeos | 494 } // namespace chromeos |
496 | 495 |
497 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 496 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |