Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / error_screen_actor.h
blob1d40cdffcfae47a2c530d4434af7985d3cd903ac
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_
8 #include <string>
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"
15 namespace base {
16 class DictionaryValue;
19 namespace chromeos {
21 class ErrorScreenActor {
22 public:
23 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
31 // screen.
32 OobeUI::Screen parent_screen() const { return parent_screen_; }
34 // Sets screen this actor belongs to.
35 virtual void SetDelegate(ErrorScreenActorDelegate* delegate) = 0;
37 // Shows the screen.
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;
46 // Hides the screen.
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;
67 protected:
68 NetworkError::UIState ui_state_;
69 NetworkError::ErrorState error_state_;
70 std::string network_;
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_