| 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_BASE_SCREEN_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_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 BaseScreen; | 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 BaseScreenDelegate { |
| 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 |
| 24 // facilitate interpretation of log files only, they are subject to change | 24 // facilitate interpretation of log files only, they are subject to change |
| 25 // without notice.) | 25 // without notice.) |
| 26 enum ExitCodes { | 26 enum ExitCodes { |
| 27 // "Continue" was pressed on network screen and network is online. | 27 // "Continue" was pressed on network screen and network is online. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 57 virtual void OnExit(ExitCodes exit_code) = 0; | 57 virtual void OnExit(ExitCodes exit_code) = 0; |
| 58 | 58 |
| 59 // Forces current screen showing. | 59 // Forces current screen showing. |
| 60 virtual void ShowCurrentScreen() = 0; | 60 virtual void ShowCurrentScreen() = 0; |
| 61 | 61 |
| 62 virtual ErrorScreen* GetErrorScreen() = 0; | 62 virtual ErrorScreen* GetErrorScreen() = 0; |
| 63 virtual void ShowErrorScreen() = 0; | 63 virtual void ShowErrorScreen() = 0; |
| 64 virtual void HideErrorScreen(BaseScreen* parent_screen) = 0; | 64 virtual void HideErrorScreen(BaseScreen* parent_screen) = 0; |
| 65 | 65 |
| 66 protected: | 66 protected: |
| 67 virtual ~ScreenObserver() {} | 67 virtual ~BaseScreenDelegate() {} |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace chromeos | 70 } // namespace chromeos |
| 71 | 71 |
| 72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_SCREEN_OBSERVER_H_ | 72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_BASE_SCREEN_DELEGATE_H_ |
| OLD | NEW |