Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / error_screen.cc
blobda9884ea577b7c2aa62025e24e6c0bb948a6ee14
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 #include "chrome/browser/chromeos/login/screens/error_screen.h"
7 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h"
8 #include "chrome/browser/chromeos/login/wizard_controller.h"
10 namespace chromeos {
12 ErrorScreen::ErrorScreen(ScreenObserver* screen_observer,
13 ErrorScreenActor* actor)
14 : WizardScreen(screen_observer),
15 actor_(actor),
16 parent_screen_(OobeDisplay::SCREEN_UNKNOWN) {
17 DCHECK(actor_);
20 ErrorScreen::~ErrorScreen() {
23 void ErrorScreen::PrepareToShow() {
26 void ErrorScreen::Show() {
27 DCHECK(actor_);
28 actor_->Show(parent_screen(), NULL);
31 void ErrorScreen::Hide() {
32 DCHECK(actor_);
33 actor_->Hide();
36 std::string ErrorScreen::GetName() const {
37 return WizardController::kErrorScreenName;
40 void ErrorScreen::FixCaptivePortal() {
41 DCHECK(actor_);
42 actor_->FixCaptivePortal();
45 void ErrorScreen::ShowCaptivePortal() {
46 DCHECK(actor_);
47 actor_->ShowCaptivePortal();
50 void ErrorScreen::HideCaptivePortal() {
51 DCHECK(actor_);
52 actor_->HideCaptivePortal();
55 void ErrorScreen::SetUIState(UIState ui_state) {
56 DCHECK(actor_);
57 actor_->SetUIState(ui_state);
60 ErrorScreen::UIState ErrorScreen::GetUIState() const {
61 DCHECK(actor_);
62 return actor_->ui_state();
65 void ErrorScreen::SetErrorState(ErrorState error_state,
66 const std::string& network) {
67 DCHECK(actor_);
68 actor_->SetErrorState(error_state, network);
71 } // namespace chromeos