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_ERROR_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/chromeos/login/oobe_display.h"
11 #include "chrome/browser/chromeos/login/oobe_display.h"
12 #include "chrome/browser/chromeos/login/screens/wizard_screen.h"
16 class ErrorScreenActor
;
19 // Controller for the error screen.
20 class ErrorScreen
: public WizardScreen
{
26 UI_STATE_LOCALLY_MANAGED
,
28 UI_STATE_LOCAL_STATE_ERROR
32 ERROR_STATE_UNKNOWN
= 0,
36 ERROR_STATE_AUTH_EXT_TIMEOUT
39 ErrorScreen(ScreenObserver
* screen_observer
, ErrorScreenActor
* actor
);
40 virtual ~ErrorScreen();
42 // WizardScreen implementation.
43 virtual void PrepareToShow() OVERRIDE
;
44 virtual void Show() OVERRIDE
;
45 virtual void Hide() OVERRIDE
;
46 virtual std::string
GetName() const OVERRIDE
;
48 // Initializes captive portal dialog and shows that if needed.
49 void FixCaptivePortal();
51 // Shows captive portal dialog.
52 void ShowCaptivePortal();
54 // Hides captive portal dialog.
55 void HideCaptivePortal();
57 // Sets current UI state.
58 void SetUIState(UIState ui_state
);
60 UIState
GetUIState() const;
62 // Sets current error screen content according to current UI state,
63 // |error_state|, and |network|.
64 void SetErrorState(ErrorState error_state
, const std::string
& network
);
66 void set_parent_screen(OobeDisplay::Screen parent_screen
) {
67 parent_screen_
= parent_screen
;
69 OobeDisplay::Screen
parent_screen() const { return parent_screen_
; }
72 ErrorScreenActor
* actor_
;
74 OobeDisplay::Screen parent_screen_
;
76 DISALLOW_COPY_AND_ASSIGN(ErrorScreen
);
79 } // namespace chromeos
81 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_