Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: chrome/browser/chromeos/login/screens/base_screen_delegate.h

Issue 2705363002: cros: Move BaseScreenDelegate::ExitCodes into separate file, ScreenExitCode. (Closed)
Patch Set: Rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/chromeos/login/screens/screen_exit_code.h"
11
10 namespace login { 12 namespace login {
11 class ScreenContext; 13 class ScreenContext;
12 } 14 }
13 15
14 namespace chromeos { 16 namespace chromeos {
15 17
16 class BaseScreen; 18 class BaseScreen;
17 class ErrorScreen; 19 class ErrorScreen;
18 20
19 // Interface that handles notifications received from any of login wizard 21 // Interface that handles notifications received from any of login wizard
20 // screens. 22 // screens.
21 class BaseScreenDelegate { 23 class BaseScreenDelegate {
22 public: 24 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 ENABLE_DEBUGGING_FINISHED = 21,
55 ENABLE_DEBUGGING_CANCELED = 22,
56 ARC_TERMS_OF_SERVICE_FINISHED = 23,
57 UPDATE_ERROR_UPDATING_CRITICAL_UPDATE = 24,
58 EXIT_CODES_COUNT // not a real code, must be the last
59 };
60
61 // Method called by a screen when user's done with it. 25 // Method called by a screen when user's done with it.
62 virtual void OnExit(BaseScreen& screen, 26 virtual void OnExit(BaseScreen& screen,
63 ExitCodes exit_code, 27 ScreenExitCode exit_code,
64 const ::login::ScreenContext* context) = 0; 28 const ::login::ScreenContext* context) = 0;
65 29
66 // Forces current screen showing. 30 // Forces current screen showing.
67 virtual void ShowCurrentScreen() = 0; 31 virtual void ShowCurrentScreen() = 0;
68 32
69 virtual ErrorScreen* GetErrorScreen() = 0; 33 virtual ErrorScreen* GetErrorScreen() = 0;
70 virtual void ShowErrorScreen() = 0; 34 virtual void ShowErrorScreen() = 0;
71 virtual void HideErrorScreen(BaseScreen* parent_screen) = 0; 35 virtual void HideErrorScreen(BaseScreen* parent_screen) = 0;
72 36
73 protected: 37 protected:
74 virtual ~BaseScreenDelegate() {} 38 virtual ~BaseScreenDelegate() {}
75 }; 39 };
76 40
77 } // namespace chromeos 41 } // namespace chromeos
78 42
79 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_ 43 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698