| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/login/screens/kiosk_autolaunch_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/kiosk_autolaunch_screen.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/chromeos/customization/customization_document.h" | 8 #include "chrome/browser/chromeos/customization/customization_document.h" |
| 9 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" | 9 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" |
| 10 #include "chrome/browser/chromeos/login/wizard_controller.h" | 10 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 | 13 |
| 14 KioskAutolaunchScreen::KioskAutolaunchScreen( | 14 KioskAutolaunchScreen::KioskAutolaunchScreen( |
| 15 BaseScreenDelegate* base_screen_delegate, | 15 BaseScreenDelegate* base_screen_delegate, |
| 16 KioskAutolaunchScreenActor* actor) | 16 KioskAutolaunchScreenActor* actor) |
| 17 : BaseScreen(base_screen_delegate, | 17 : BaseScreen(base_screen_delegate, OobeScreen::SCREEN_KIOSK_AUTOLAUNCH), |
| 18 WizardController::kKioskAutolaunchScreenName), | |
| 19 actor_(actor) { | 18 actor_(actor) { |
| 20 DCHECK(actor_); | 19 DCHECK(actor_); |
| 21 if (actor_) | 20 if (actor_) |
| 22 actor_->SetDelegate(this); | 21 actor_->SetDelegate(this); |
| 23 } | 22 } |
| 24 | 23 |
| 25 KioskAutolaunchScreen::~KioskAutolaunchScreen() { | 24 KioskAutolaunchScreen::~KioskAutolaunchScreen() { |
| 26 if (actor_) | 25 if (actor_) |
| 27 actor_->SetDelegate(NULL); | 26 actor_->SetDelegate(NULL); |
| 28 } | 27 } |
| 29 | 28 |
| 30 void KioskAutolaunchScreen::Show() { | 29 void KioskAutolaunchScreen::Show() { |
| 31 if (actor_) | 30 if (actor_) |
| 32 actor_->Show(); | 31 actor_->Show(); |
| 33 } | 32 } |
| 34 | 33 |
| 35 void KioskAutolaunchScreen::OnExit(bool confirmed) { | 34 void KioskAutolaunchScreen::OnExit(bool confirmed) { |
| 36 Finish(confirmed ? BaseScreenDelegate::KIOSK_AUTOLAUNCH_CONFIRMED | 35 Finish(confirmed ? BaseScreenDelegate::KIOSK_AUTOLAUNCH_CONFIRMED |
| 37 : BaseScreenDelegate::KIOSK_AUTOLAUNCH_CANCELED); | 36 : BaseScreenDelegate::KIOSK_AUTOLAUNCH_CANCELED); |
| 38 } | 37 } |
| 39 | 38 |
| 40 void KioskAutolaunchScreen::OnActorDestroyed( | 39 void KioskAutolaunchScreen::OnActorDestroyed( |
| 41 KioskAutolaunchScreenActor* actor) { | 40 KioskAutolaunchScreenActor* actor) { |
| 42 if (actor_ == actor) | 41 if (actor_ == actor) |
| 43 actor_ = NULL; | 42 actor_ = NULL; |
| 44 } | 43 } |
| 45 | 44 |
| 46 } // namespace chromeos | 45 } // namespace chromeos |
| OLD | NEW |