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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); | 239 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); |
240 | 240 |
241 // NetworkStateInformer::NetworkStateInformerObserver implementation: | 241 // NetworkStateInformer::NetworkStateInformerObserver implementation: |
242 virtual void OnNetworkReady() override; | 242 virtual void OnNetworkReady() override; |
243 virtual void UpdateState(ErrorScreenActor::ErrorReason reason) override; | 243 virtual void UpdateState(ErrorScreenActor::ErrorReason reason) override; |
244 | 244 |
245 // Required Local State preferences. | 245 // Required Local State preferences. |
246 static void RegisterPrefs(PrefRegistrySimple* registry); | 246 static void RegisterPrefs(PrefRegistrySimple* registry); |
247 | 247 |
| 248 // Checks whether the device policy allows the system to be shut down and if |
| 249 // so initiates the shutdown. If system shutdown is forbidden this function |
| 250 // triggers a reboot. |
| 251 static void RequestShutdown(); |
| 252 |
248 // OobeUI::Observer implemetation. | 253 // OobeUI::Observer implemetation. |
249 virtual void OnCurrentScreenChanged(OobeUI::Screen current_screen, | 254 virtual void OnCurrentScreenChanged(OobeUI::Screen current_screen, |
250 OobeUI::Screen new_screen) override; | 255 OobeUI::Screen new_screen) override; |
251 | 256 |
252 // Returns least used user login input method. | 257 // Returns least used user login input method. |
253 std::string GetUserLRUInputMethod(const std::string& username) const; | 258 std::string GetUserLRUInputMethod(const std::string& username) const; |
254 | 259 |
255 void SetFocusPODCallbackForTesting(base::Closure callback); | 260 void SetFocusPODCallbackForTesting(base::Closure callback); |
256 | 261 |
257 private: | 262 private: |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 void HandleGetUsers(); | 351 void HandleGetUsers(); |
347 void HandleAuthenticateUser(const std::string& username, | 352 void HandleAuthenticateUser(const std::string& username, |
348 const std::string& password); | 353 const std::string& password); |
349 void HandleAttemptUnlock(const std::string& username); | 354 void HandleAttemptUnlock(const std::string& username); |
350 void HandleLaunchDemoUser(); | 355 void HandleLaunchDemoUser(); |
351 void HandleLaunchIncognito(); | 356 void HandleLaunchIncognito(); |
352 void HandleLaunchPublicSession(const std::string& user_id, | 357 void HandleLaunchPublicSession(const std::string& user_id, |
353 const std::string& locale, | 358 const std::string& locale, |
354 const std::string& input_method); | 359 const std::string& input_method); |
355 void HandleOfflineLogin(const base::ListValue* args); | 360 void HandleOfflineLogin(const base::ListValue* args); |
| 361 void HandleRestartSystem(); |
356 void HandleShutdownSystem(); | 362 void HandleShutdownSystem(); |
357 void HandleLoadWallpaper(const std::string& email); | 363 void HandleLoadWallpaper(const std::string& email); |
358 void HandleRebootSystem(); | 364 void HandleRebootSystem(); |
359 void HandleRemoveUser(const std::string& email); | 365 void HandleRemoveUser(const std::string& email); |
360 void HandleShowAddUser(const base::ListValue* args); | 366 void HandleShowAddUser(const base::ListValue* args); |
361 void HandleToggleEnrollmentScreen(); | 367 void HandleToggleEnrollmentScreen(); |
362 void HandleToggleEnableDebuggingScreen(); | 368 void HandleToggleEnableDebuggingScreen(); |
363 void HandleToggleKioskEnableScreen(); | 369 void HandleToggleKioskEnableScreen(); |
364 void HandleToggleResetScreen(); | 370 void HandleToggleResetScreen(); |
365 void HandleToggleKioskAutolaunchScreen(); | 371 void HandleToggleKioskAutolaunchScreen(); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; | 520 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; |
515 | 521 |
516 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; | 522 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; |
517 | 523 |
518 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 524 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
519 }; | 525 }; |
520 | 526 |
521 } // namespace chromeos | 527 } // namespace chromeos |
522 | 528 |
523 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 529 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |