| 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/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 15 #include "base/values.h" | 16 #include "base/values.h" |
| 16 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/chrome_notification_types.h" | 18 #include "chrome/browser/chrome_notification_types.h" |
| 18 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 19 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 19 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" | 20 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" |
| 20 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 21 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 21 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 22 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 return; | 401 return; |
| 401 | 402 |
| 402 if (!webui_visible_) | 403 if (!webui_visible_) |
| 403 return; | 404 return; |
| 404 | 405 |
| 405 if (splash_wait_timer_.IsRunning()) | 406 if (splash_wait_timer_.IsRunning()) |
| 406 return; | 407 return; |
| 407 | 408 |
| 408 ClearNetworkWaitTimer(); | 409 ClearNetworkWaitTimer(); |
| 409 | 410 |
| 410 const int64 time_taken_ms = (base::TimeTicks::Now() - | 411 const int64_t time_taken_ms = |
| 411 base::TimeTicks::FromInternalValue(launch_splash_start_time_)). | 412 (base::TimeTicks::Now() - |
| 412 InMilliseconds(); | 413 base::TimeTicks::FromInternalValue(launch_splash_start_time_)) |
| 414 .InMilliseconds(); |
| 413 | 415 |
| 414 // Enforce that we show app install splash screen for some minimum amount | 416 // Enforce that we show app install splash screen for some minimum amount |
| 415 // of time. | 417 // of time. |
| 416 if (!skip_splash_wait_ && time_taken_ms < kAppInstallSplashScreenMinTimeMS) { | 418 if (!skip_splash_wait_ && time_taken_ms < kAppInstallSplashScreenMinTimeMS) { |
| 417 splash_wait_timer_.Start( | 419 splash_wait_timer_.Start( |
| 418 FROM_HERE, | 420 FROM_HERE, |
| 419 base::TimeDelta::FromMilliseconds( | 421 base::TimeDelta::FromMilliseconds( |
| 420 kAppInstallSplashScreenMinTimeMS - time_taken_ms), | 422 kAppInstallSplashScreenMinTimeMS - time_taken_ms), |
| 421 this, | 423 this, |
| 422 &AppLaunchController::OnReadyToLaunch); | 424 &AppLaunchController::OnReadyToLaunch); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 444 KioskAppLaunchError::Save(error); | 446 KioskAppLaunchError::Save(error); |
| 445 chrome::AttemptUserExit(); | 447 chrome::AttemptUserExit(); |
| 446 CleanUp(); | 448 CleanUp(); |
| 447 } | 449 } |
| 448 | 450 |
| 449 bool AppLaunchController::IsShowingNetworkConfigScreen() { | 451 bool AppLaunchController::IsShowingNetworkConfigScreen() { |
| 450 return network_config_requested_; | 452 return network_config_requested_; |
| 451 } | 453 } |
| 452 | 454 |
| 453 } // namespace chromeos | 455 } // namespace chromeos |
| OLD | NEW |