error_screen.cc revision 58537e28ecd584eab876aee8be7156509866d23a
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. 4 5#include "chrome/browser/chromeos/login/screens/error_screen.h" 6 7#include "chrome/browser/chromeos/login/screens/error_screen_actor.h" 8#include "chrome/browser/chromeos/login/wizard_controller.h" 9 10namespace chromeos { 11 12ErrorScreen::ErrorScreen(ScreenObserver* screen_observer, 13 ErrorScreenActor* actor) 14 : WizardScreen(screen_observer), 15 actor_(actor), 16 parent_screen_(OobeDisplay::SCREEN_UNKNOWN) { 17 DCHECK(actor_); 18} 19 20ErrorScreen::~ErrorScreen() { 21} 22 23void ErrorScreen::PrepareToShow() { 24} 25 26void ErrorScreen::Show() { 27 DCHECK(actor_); 28 actor_->Show(parent_screen(), NULL); 29} 30 31void ErrorScreen::Hide() { 32 DCHECK(actor_); 33 actor_->Hide(); 34} 35 36std::string ErrorScreen::GetName() const { 37 return WizardController::kErrorScreenName; 38} 39 40void ErrorScreen::FixCaptivePortal() { 41 DCHECK(actor_); 42 actor_->FixCaptivePortal(); 43} 44 45void ErrorScreen::ShowCaptivePortal() { 46 DCHECK(actor_); 47 actor_->ShowCaptivePortal(); 48} 49 50void ErrorScreen::HideCaptivePortal() { 51 DCHECK(actor_); 52 actor_->HideCaptivePortal(); 53} 54 55void ErrorScreen::SetUIState(UIState ui_state) { 56 DCHECK(actor_); 57 actor_->SetUIState(ui_state); 58} 59 60ErrorScreen::UIState ErrorScreen::GetUIState() const { 61 DCHECK(actor_); 62 return actor_->ui_state(); 63} 64 65void ErrorScreen::SetErrorState(ErrorState error_state, 66 const std::string& network) { 67 DCHECK(actor_); 68 actor_->SetErrorState(error_state, network); 69} 70 71} // namespace chromeos 72