Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / base_screen_delegate.h
blob62e273219efb45dbc620346b375f35c47f18b6d1
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_
8 #include <string>
10 namespace login {
11 class ScreenContext;
14 namespace chromeos {
16 class BaseScreen;
17 class ErrorScreen;
19 // Interface that handles notifications received from any of login wizard
20 // screens.
21 class BaseScreenDelegate {
22 public:
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
29 // without notice.)
30 enum ExitCodes {
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,
36 UPDATE_INSTALLED = 3,
37 UPDATE_NOUPDATE = 4,
38 UPDATE_ERROR_CHECKING_FOR_UPDATE = 5,
39 UPDATE_ERROR_UPDATING = 6,
40 USER_IMAGE_SELECTED = 7,
41 EULA_ACCEPTED = 8,
42 EULA_BACK = 9,
43 ENTERPRISE_AUTO_ENROLLMENT_CHECK_COMPLETED = 10,
44 ENTERPRISE_ENROLLMENT_COMPLETED = 11,
45 ENTERPRISE_ENROLLMENT_BACK = 12,
46 RESET_CANCELED = 13,
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,
62 ExitCodes exit_code,
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;
72 protected:
73 virtual ~BaseScreenDelegate() {}
76 } // namespace chromeos
78 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_