| 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_document.h" | 8 #include "chrome/browser/chromeos/customization_document.h" |
| 9 #include "chrome/browser/chromeos/login/screens/screen_observer.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(ScreenObserver* observer, | 14 KioskAutolaunchScreen::KioskAutolaunchScreen( |
| 15 KioskAutolaunchScreenActor* actor) | 15 BaseScreenDelegate* base_screen_delegate, |
| 16 : BaseScreen(observer), actor_(actor) { | 16 KioskAutolaunchScreenActor* actor) |
| 17 : BaseScreen(base_screen_delegate), actor_(actor) { |
| 17 DCHECK(actor_); | 18 DCHECK(actor_); |
| 18 if (actor_) | 19 if (actor_) |
| 19 actor_->SetDelegate(this); | 20 actor_->SetDelegate(this); |
| 20 } | 21 } |
| 21 | 22 |
| 22 KioskAutolaunchScreen::~KioskAutolaunchScreen() { | 23 KioskAutolaunchScreen::~KioskAutolaunchScreen() { |
| 23 if (actor_) | 24 if (actor_) |
| 24 actor_->SetDelegate(NULL); | 25 actor_->SetDelegate(NULL); |
| 25 } | 26 } |
| 26 | 27 |
| 27 void KioskAutolaunchScreen::Show() { | 28 void KioskAutolaunchScreen::Show() { |
| 28 if (actor_) | 29 if (actor_) |
| 29 actor_->Show(); | 30 actor_->Show(); |
| 30 } | 31 } |
| 31 | 32 |
| 32 std::string KioskAutolaunchScreen::GetName() const { | 33 std::string KioskAutolaunchScreen::GetName() const { |
| 33 return WizardController::kKioskAutolaunchScreenName; | 34 return WizardController::kKioskAutolaunchScreenName; |
| 34 } | 35 } |
| 35 | 36 |
| 36 void KioskAutolaunchScreen::OnExit(bool confirmed) { | 37 void KioskAutolaunchScreen::OnExit(bool confirmed) { |
| 37 get_screen_observer()->OnExit( | 38 get_base_screen_delegate()->OnExit( |
| 38 confirmed ? ScreenObserver::KIOSK_AUTOLAUNCH_CONFIRMED : | 39 confirmed ? BaseScreenDelegate::KIOSK_AUTOLAUNCH_CONFIRMED |
| 39 ScreenObserver::KIOSK_AUTOLAUNCH_CANCELED); | 40 : BaseScreenDelegate::KIOSK_AUTOLAUNCH_CANCELED); |
| 40 } | 41 } |
| 41 | 42 |
| 42 void KioskAutolaunchScreen::OnActorDestroyed( | 43 void KioskAutolaunchScreen::OnActorDestroyed( |
| 43 KioskAutolaunchScreenActor* actor) { | 44 KioskAutolaunchScreenActor* actor) { |
| 44 if (actor_ == actor) | 45 if (actor_ == actor) |
| 45 actor_ = NULL; | 46 actor_ = NULL; |
| 46 } | 47 } |
| 47 | 48 |
| 48 } // namespace chromeos | 49 } // namespace chromeos |
| OLD | NEW |