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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_
19 // Interface that handles notifications received from any of login wizard
21 class BaseScreenDelegate
{
23 // Each login screen or a view shown within login wizard view is itself a
24 // state. Upon exit each view returns one of the results by calling OnExit()
25 // method. Depending on the result and the current view or state login wizard
26 // decides what is the next view to show. There must be an exit code for each
27 // way to exit the screen for each screen. (Numeric ids are provided to
28 // facilitate interpretation of log files only, they are subject to change
31 // "Continue" was pressed on network screen and network is online.
32 NETWORK_CONNECTED
= 0,
33 HID_DETECTION_COMPLETED
= 1,
34 // Connection failed while trying to load a WebPageScreen.
35 CONNECTION_FAILED
= 2,
38 UPDATE_ERROR_CHECKING_FOR_UPDATE
= 5,
39 UPDATE_ERROR_UPDATING
= 6,
40 USER_IMAGE_SELECTED
= 7,
43 ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED
= 10,
44 ENTERPRISE_ENROLLMENT_COMPLETED
= 11,
45 ENTERPRISE_ENROLLMENT_BACK
= 12,
47 KIOSK_AUTOLAUNCH_CANCELED
= 14,
48 KIOSK_AUTOLAUNCH_CONFIRMED
= 15,
49 KIOSK_ENABLE_COMPLETED
= 16,
50 TERMS_OF_SERVICE_DECLINED
= 17,
51 TERMS_OF_SERVICE_ACCEPTED
= 18,
52 WRONG_HWID_WARNING_SKIPPED
= 19,
53 CONTROLLER_PAIRING_FINISHED
= 20,
54 HOST_PAIRING_FINISHED
= 21,
55 ENABLE_DEBUGGING_FINISHED
= 22,
56 ENABLE_DEBUGGING_CANCELED
= 23,
57 EXIT_CODES_COUNT
// not a real code, must be the last
60 // Method called by a screen when user's done with it.
61 virtual void OnExit(BaseScreen
& screen
,
63 const ::login::ScreenContext
* context
) = 0;
65 // Forces current screen showing.
66 virtual void ShowCurrentScreen() = 0;
68 virtual ErrorScreen
* GetErrorScreen() = 0;
69 virtual void ShowErrorScreen() = 0;
70 virtual void HideErrorScreen(BaseScreen
* parent_screen
) = 0;
73 virtual ~BaseScreenDelegate() {}
76 } // namespace chromeos
78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_