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/app_launch_controller.h" | 5 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 oobe_display_(oobe_display), | 44 oobe_display_(oobe_display), |
45 app_launch_splash_screen_actor_( | 45 app_launch_splash_screen_actor_( |
46 oobe_display_->GetAppLaunchSplashScreenActor()), | 46 oobe_display_->GetAppLaunchSplashScreenActor()), |
47 error_screen_actor_(oobe_display_->GetErrorScreenActor()), | 47 error_screen_actor_(oobe_display_->GetErrorScreenActor()), |
48 waiting_for_network_(false), | 48 waiting_for_network_(false), |
49 showing_network_dialog_(false), | 49 showing_network_dialog_(false), |
50 launch_splash_start_time_(0) { | 50 launch_splash_start_time_(0) { |
51 } | 51 } |
52 | 52 |
53 AppLaunchController::~AppLaunchController() { | 53 AppLaunchController::~AppLaunchController() { |
| 54 app_launch_splash_screen_actor_->SetDelegate(NULL); |
54 } | 55 } |
55 | 56 |
56 void AppLaunchController::StartAppLaunch() { | 57 void AppLaunchController::StartAppLaunch() { |
57 DVLOG(1) << "Starting kiosk mode..."; | 58 DVLOG(1) << "Starting kiosk mode..."; |
58 launch_splash_start_time_ = base::TimeTicks::Now().ToInternalValue(); | 59 launch_splash_start_time_ = base::TimeTicks::Now().ToInternalValue(); |
59 | 60 |
60 // TODO(tengs): Add a loading profile app launch state. | 61 // TODO(tengs): Add a loading profile app launch state. |
61 app_launch_splash_screen_actor_->SetDelegate(this); | 62 app_launch_splash_screen_actor_->SetDelegate(this); |
62 app_launch_splash_screen_actor_->Show(app_id_); | 63 app_launch_splash_screen_actor_->Show(app_id_); |
63 | 64 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 LOG(ERROR) << "Kiosk launch failed. Will now shut down."; | 201 LOG(ERROR) << "Kiosk launch failed. Will now shut down."; |
201 DCHECK_NE(KioskAppLaunchError::NONE, error); | 202 DCHECK_NE(KioskAppLaunchError::NONE, error); |
202 | 203 |
203 // Saves the error and ends the session to go back to login screen. | 204 // Saves the error and ends the session to go back to login screen. |
204 KioskAppLaunchError::Save(error); | 205 KioskAppLaunchError::Save(error); |
205 chrome::AttemptUserExit(); | 206 chrome::AttemptUserExit(); |
206 Cleanup(); | 207 Cleanup(); |
207 } | 208 } |
208 | 209 |
209 } // namespace chromeos | 210 } // namespace chromeos |
OLD | NEW |