Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / kiosk_autolaunch_screen.cc
blobcaab4bf9c269e5b177502df745312c39045268b6
1 // Copyright 2013 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/kiosk_autolaunch_screen.h"
7 #include "base/logging.h"
8 #include "chrome/browser/chromeos/customization_document.h"
9 #include "chrome/browser/chromeos/login/screens/screen_observer.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h"
12 namespace chromeos {
14 KioskAutolaunchScreen::KioskAutolaunchScreen(ScreenObserver* observer,
15 KioskAutolaunchScreenActor* actor)
16 : WizardScreen(observer), actor_(actor) {
17 DCHECK(actor_);
18 if (actor_)
19 actor_->SetDelegate(this);
22 KioskAutolaunchScreen::~KioskAutolaunchScreen() {
23 if (actor_)
24 actor_->SetDelegate(NULL);
27 void KioskAutolaunchScreen::Show() {
28 if (actor_)
29 actor_->Show();
32 std::string KioskAutolaunchScreen::GetName() const {
33 return WizardController::kKioskAutolaunchScreenName;
36 void KioskAutolaunchScreen::OnExit(bool confirmed) {
37 get_screen_observer()->OnExit(
38 confirmed ? ScreenObserver::KIOSK_AUTOLAUNCH_CONFIRMED :
39 ScreenObserver::KIOSK_AUTOLAUNCH_CANCELED);
42 void KioskAutolaunchScreen::OnActorDestroyed(
43 KioskAutolaunchScreenActor* actor) {
44 if (actor_ == actor)
45 actor_ = NULL;
48 } // namespace chromeos