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_ACTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_ACTOR_H_
10 #include "base/basictypes.h"
11 #include "chrome/browser/chromeos/login/screens/error_screen_actor_delegate.h"
12 #include "chrome/browser/chromeos/login/screens/network_error.h"
13 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
16 class DictionaryValue
;
21 class ErrorScreenActor
{
24 virtual ~ErrorScreenActor();
26 NetworkError::UIState
ui_state() const { return ui_state_
; }
27 NetworkError::ErrorState
error_state() const { return error_state_
; }
29 // Returns id of the screen behind error screen ("caller" screen).
30 // Returns OobeUI::SCREEN_UNKNOWN if error screen isn't the current
32 OobeUI::Screen
parent_screen() const { return parent_screen_
; }
34 // Sets screen this actor belongs to.
35 virtual void SetDelegate(ErrorScreenActorDelegate
* delegate
) = 0;
38 virtual void Show(OobeDisplay::Screen parent_screen
,
39 base::DictionaryValue
* params
) = 0;
41 // Shows the screen and call |on_hide| on hide.
42 virtual void Show(OobeDisplay::Screen parent_screen
,
43 base::DictionaryValue
* params
,
44 const base::Closure
& on_hide
) = 0;
47 virtual void Hide() = 0;
49 // Initializes captive portal dialog and shows that if needed.
50 virtual void FixCaptivePortal() = 0;
52 // Shows captive portal dialog.
53 virtual void ShowCaptivePortal() = 0;
55 // Hides captive portal dialog.
56 virtual void HideCaptivePortal() = 0;
58 virtual void SetUIState(NetworkError::UIState ui_state
) = 0;
59 virtual void SetErrorState(NetworkError::ErrorState error_state
,
60 const std::string
& network
) = 0;
62 virtual void AllowGuestSignin(bool allowed
) = 0;
63 virtual void AllowOfflineLogin(bool allowed
) = 0;
65 virtual void ShowConnectingIndicator(bool show
) = 0;
68 NetworkError::UIState ui_state_
;
69 NetworkError::ErrorState error_state_
;
72 bool guest_signin_allowed_
;
73 bool offline_login_allowed_
;
74 bool show_connecting_indicator_
;
76 OobeUI::Screen parent_screen_
;
78 DISALLOW_COPY_AND_ASSIGN(ErrorScreenActor
);
81 } // namespace chromeos
83 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_ACTOR_H_