| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 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_SCREENS_SCREEN_OBSERVER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 namespace chromeos { | |
| 11 | |
| 12 class ErrorScreen; | |
| 13 class BaseScreen; | |
| 14 | |
| 15 // Interface that handles notifications received from any of login wizard | |
| 16 // screens. | |
| 17 class ScreenObserver { | |
| 18 public: | |
| 19 // Each login screen or a view shown within login wizard view is itself a | |
| 20 // state. Upon exit each view returns one of the results by calling OnExit() | |
| 21 // method. Depending on the result and the current view or state login wizard | |
| 22 // decides what is the next view to show. There must be an exit code for each | |
| 23 // way to exit the screen for each screen. (Numeric ids are provided to | |
| 24 // facilitate interpretation of log files only, they are subject to change | |
| 25 // without notice.) | |
| 26 enum ExitCodes { | |
| 27 // "Continue" was pressed on network screen and network is online. | |
| 28 NETWORK_CONNECTED = 0, | |
| 29 HID_DETECTION_COMPLETED = 1, | |
| 30 // Connection failed while trying to load a WebPageScreen. | |
| 31 CONNECTION_FAILED = 2, | |
| 32 UPDATE_INSTALLED = 3, | |
| 33 UPDATE_NOUPDATE = 4, | |
| 34 UPDATE_ERROR_CHECKING_FOR_UPDATE = 5, | |
| 35 UPDATE_ERROR_UPDATING = 6, | |
| 36 USER_IMAGE_SELECTED = 7, | |
| 37 EULA_ACCEPTED = 8, | |
| 38 EULA_BACK = 9, | |
| 39 ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED = 10, | |
| 40 ENTERPRISE_ENROLLMENT_COMPLETED = 11, | |
| 41 ENTERPRISE_AUTO_MAGIC_ENROLLMENT_COMPLETED = 12, | |
| 42 ENTERPRISE_ENROLLMENT_BACK = 13, | |
| 43 RESET_CANCELED = 14, | |
| 44 KIOSK_AUTOLAUNCH_CANCELED = 15, | |
| 45 KIOSK_AUTOLAUNCH_CONFIRMED = 16, | |
| 46 KIOSK_ENABLE_COMPLETED = 17, | |
| 47 TERMS_OF_SERVICE_DECLINED = 18, | |
| 48 TERMS_OF_SERVICE_ACCEPTED = 19, | |
| 49 WRONG_HWID_WARNING_SKIPPED = 20, | |
| 50 CONTROLLER_PAIRING_FINISHED = 21, | |
| 51 HOST_PAIRING_FINISHED = 22, | |
| 52 DEVICE_NOT_DISABLED = 23, | |
| 53 EXIT_CODES_COUNT // not a real code, must be the last | |
| 54 }; | |
| 55 | |
| 56 // Method called by a screen when user's done with it. | |
| 57 virtual void OnExit(ExitCodes exit_code) = 0; | |
| 58 | |
| 59 // Forces current screen showing. | |
| 60 virtual void ShowCurrentScreen() = 0; | |
| 61 | |
| 62 virtual ErrorScreen* GetErrorScreen() = 0; | |
| 63 virtual void ShowErrorScreen() = 0; | |
| 64 virtual void HideErrorScreen(BaseScreen* parent_screen) = 0; | |
| 65 | |
| 66 protected: | |
| 67 virtual ~ScreenObserver() {} | |
| 68 }; | |
| 69 | |
| 70 } // namespace chromeos | |
| 71 | |
| 72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ | |
| OLD | NEW |