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), actor_(actor) { | 17 : BaseScreen(base_screen_delegate, |
| 18 WizardController::kKioskAutolaunchScreenName), |
| 19 actor_(actor) { |
18 DCHECK(actor_); | 20 DCHECK(actor_); |
19 if (actor_) | 21 if (actor_) |
20 actor_->SetDelegate(this); | 22 actor_->SetDelegate(this); |
21 } | 23 } |
22 | 24 |
23 KioskAutolaunchScreen::~KioskAutolaunchScreen() { | 25 KioskAutolaunchScreen::~KioskAutolaunchScreen() { |
24 if (actor_) | 26 if (actor_) |
25 actor_->SetDelegate(NULL); | 27 actor_->SetDelegate(NULL); |
26 } | 28 } |
27 | 29 |
28 void KioskAutolaunchScreen::Show() { | 30 void KioskAutolaunchScreen::Show() { |
29 if (actor_) | 31 if (actor_) |
30 actor_->Show(); | 32 actor_->Show(); |
31 } | 33 } |
32 | 34 |
33 std::string KioskAutolaunchScreen::GetName() const { | |
34 return WizardController::kKioskAutolaunchScreenName; | |
35 } | |
36 | |
37 void KioskAutolaunchScreen::OnExit(bool confirmed) { | 35 void KioskAutolaunchScreen::OnExit(bool confirmed) { |
38 Finish(confirmed ? BaseScreenDelegate::KIOSK_AUTOLAUNCH_CONFIRMED | 36 Finish(confirmed ? BaseScreenDelegate::KIOSK_AUTOLAUNCH_CONFIRMED |
39 : BaseScreenDelegate::KIOSK_AUTOLAUNCH_CANCELED); | 37 : BaseScreenDelegate::KIOSK_AUTOLAUNCH_CANCELED); |
40 } | 38 } |
41 | 39 |
42 void KioskAutolaunchScreen::OnActorDestroyed( | 40 void KioskAutolaunchScreen::OnActorDestroyed( |
43 KioskAutolaunchScreenActor* actor) { | 41 KioskAutolaunchScreenActor* actor) { |
44 if (actor_ == actor) | 42 if (actor_ == actor) |
45 actor_ = NULL; | 43 actor_ = NULL; |
46 } | 44 } |
47 | 45 |
48 } // namespace chromeos | 46 } // namespace chromeos |
OLD | NEW |