OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_SCREEN_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_OBSERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 // Interface that handles notifications received from any of login wizard | 13 // Interface that handles notifications received from any of login wizard |
14 // screens. | 14 // screens. |
15 class ScreenObserver { | 15 class ScreenObserver { |
16 public: | 16 public: |
17 // Each login screen or a view shown within login wizard view is itself a | 17 // Each login screen or a view shown within login wizard view is itself a |
18 // state. Upon exit each view returns one of the results by calling | 18 // state. Upon exit each view returns one of the results by calling |
19 // OnExit() method. Depending on the result and the current view or state | 19 // OnExit() method. Depending on the result and the current view or state |
20 // login wizard decides what is the next view to show. There must be an | 20 // login wizard decides what is the next view to show. There must be an |
21 // exit code for each way to exit the screen for each screen. | 21 // exit code for each way to exit the screen for each screen. |
22 enum ExitCodes { | 22 enum ExitCodes { |
23 LOGIN_SIGN_IN_SELECTED, | |
24 LOGIN_GUEST_SELECTED, | |
25 LOGIN_CREATE_ACCOUNT, | |
26 NETWORK_CONNECTED, | 23 NETWORK_CONNECTED, |
27 NETWORK_OFFLINE, | 24 NETWORK_OFFLINE, |
28 ACCOUNT_CREATE_BACK, | 25 ACCOUNT_CREATE_BACK, |
29 ACCOUNT_CREATED, | 26 ACCOUNT_CREATED, |
30 CONNECTION_FAILED, | 27 CONNECTION_FAILED, |
31 UPDATE_INSTALLED, | 28 UPDATE_INSTALLED, |
32 UPDATE_NOUPDATE, | 29 UPDATE_NOUPDATE, |
33 UPDATE_ERROR_CHECKING_FOR_UPDATE, | 30 UPDATE_ERROR_CHECKING_FOR_UPDATE, |
34 UPDATE_ERROR_UPDATING, | 31 UPDATE_ERROR_UPDATING, |
35 USER_IMAGE_SELECTED, | 32 USER_IMAGE_SELECTED, |
(...skipping 13 matching lines...) Expand all Loading... |
49 virtual void OnSetUserNamePassword(const std::string& username, | 46 virtual void OnSetUserNamePassword(const std::string& username, |
50 const std::string& password) = 0; | 47 const std::string& password) = 0; |
51 | 48 |
52 protected: | 49 protected: |
53 virtual ~ScreenObserver() {} | 50 virtual ~ScreenObserver() {} |
54 }; | 51 }; |
55 | 52 |
56 } // namespace chromeos | 53 } // namespace chromeos |
57 | 54 |
58 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_OBSERVER_H_ | 55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREEN_OBSERVER_H_ |
OLD | NEW |