Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / error_screen.h
blobe87a3b19accb1fbe59a7bb98a60770d61dabc269
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"
14 namespace chromeos {
16 class ErrorScreenActor;
17 class ScreenObserver;
19 // Controller for the error screen.
20 class ErrorScreen : public WizardScreen {
21 public:
22 enum UIState {
23 UI_STATE_UNKNOWN = 0,
24 UI_STATE_UPDATE,
25 UI_STATE_SIGNIN,
26 UI_STATE_LOCALLY_MANAGED,
27 UI_STATE_KIOSK_MODE,
28 UI_STATE_LOCAL_STATE_ERROR
31 enum ErrorState {
32 ERROR_STATE_UNKNOWN = 0,
33 ERROR_STATE_PORTAL,
34 ERROR_STATE_OFFLINE,
35 ERROR_STATE_PROXY,
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_; }
71 private:
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_