OLD | NEW |
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_SCREEN_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 | 11 |
12 class ErrorScreen; | 12 class ErrorScreen; |
13 class WizardScreen; | 13 class BaseScreen; |
14 | 14 |
15 // Interface that handles notifications received from any of login wizard | 15 // Interface that handles notifications received from any of login wizard |
16 // screens. | 16 // screens. |
17 class ScreenObserver { | 17 class ScreenObserver { |
18 public: | 18 public: |
19 // Each login screen or a view shown within login wizard view is itself a | 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() | 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 | 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 | 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 | 23 // way to exit the screen for each screen. (Numeric ids are provided to |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // just created user without asking the same info once again. | 62 // just created user without asking the same info once again. |
63 virtual void OnSetUserNamePassword(const std::string& username, | 63 virtual void OnSetUserNamePassword(const std::string& username, |
64 const std::string& password) = 0; | 64 const std::string& password) = 0; |
65 | 65 |
66 // Whether usage statistics reporting is enabled on EULA screen. | 66 // Whether usage statistics reporting is enabled on EULA screen. |
67 virtual void SetUsageStatisticsReporting(bool val) = 0; | 67 virtual void SetUsageStatisticsReporting(bool val) = 0; |
68 virtual bool GetUsageStatisticsReporting() const = 0; | 68 virtual bool GetUsageStatisticsReporting() const = 0; |
69 | 69 |
70 virtual ErrorScreen* GetErrorScreen() = 0; | 70 virtual ErrorScreen* GetErrorScreen() = 0; |
71 virtual void ShowErrorScreen() = 0; | 71 virtual void ShowErrorScreen() = 0; |
72 virtual void HideErrorScreen(WizardScreen* parent_screen) = 0; | 72 virtual void HideErrorScreen(BaseScreen* parent_screen) = 0; |
73 | 73 |
74 protected: | 74 protected: |
75 virtual ~ScreenObserver() {} | 75 virtual ~ScreenObserver() {} |
76 }; | 76 }; |
77 | 77 |
78 } // namespace chromeos | 78 } // namespace chromeos |
79 | 79 |
80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ | 80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ |
OLD | NEW |