| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/login_display_host_impl.h" | 5 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/audio/sounds.h" | 9 #include "ash/audio/sounds.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/browser/browser_shutdown.h" | 25 #include "chrome/browser/browser_shutdown.h" |
| 26 #include "chrome/browser/chrome_notification_types.h" | 26 #include "chrome/browser/chrome_notification_types.h" |
| 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 28 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 28 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 29 #include "chrome/browser/chromeos/base/locale_util.h" | 29 #include "chrome/browser/chromeos/base/locale_util.h" |
| 30 #include "chrome/browser/chromeos/boot_times_loader.h" | 30 #include "chrome/browser/chromeos/boot_times_loader.h" |
| 31 #include "chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h" | 31 #include "chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h" |
| 32 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" | 32 #include "chrome/browser/chromeos/first_run/drive_first_run_controller.h" |
| 33 #include "chrome/browser/chromeos/first_run/first_run.h" | 33 #include "chrome/browser/chromeos/first_run/first_run.h" |
| 34 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 34 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 35 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | |
| 36 #include "chrome/browser/chromeos/language_preferences.h" | 35 #include "chrome/browser/chromeos/language_preferences.h" |
| 37 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 36 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
| 38 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 37 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 39 #include "chrome/browser/chromeos/login/helper.h" | 38 #include "chrome/browser/chromeos/login/helper.h" |
| 40 #include "chrome/browser/chromeos/login/login_utils.h" | 39 #include "chrome/browser/chromeos/login/login_utils.h" |
| 41 #include "chrome/browser/chromeos/login/login_wizard.h" | 40 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 42 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" | 41 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" |
| 43 #include "chrome/browser/chromeos/login/startup_utils.h" | 42 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 44 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" | 43 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" |
| 45 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h" | 44 #include "chrome/browser/chromeos/login/ui/keyboard_driven_oobe_key_handler.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 initialize_webui_hidden_ = true; | 355 initialize_webui_hidden_ = true; |
| 357 else if (override_type == kWebUIInitPostpone) | 356 else if (override_type == kWebUIInitPostpone) |
| 358 initialize_webui_hidden_ = false; | 357 initialize_webui_hidden_ = false; |
| 359 } | 358 } |
| 360 | 359 |
| 361 // Always postpone WebUI initialization on first boot, otherwise we miss | 360 // Always postpone WebUI initialization on first boot, otherwise we miss |
| 362 // initial animation. | 361 // initial animation. |
| 363 if (!StartupUtils::IsOobeCompleted()) | 362 if (!StartupUtils::IsOobeCompleted()) |
| 364 initialize_webui_hidden_ = false; | 363 initialize_webui_hidden_ = false; |
| 365 | 364 |
| 366 // There is no wallpaper for KioskMode, don't initialize the webui hidden. | |
| 367 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) | |
| 368 initialize_webui_hidden_ = false; | |
| 369 | |
| 370 if (waiting_for_wallpaper_load_) { | 365 if (waiting_for_wallpaper_load_) { |
| 371 registrar_.Add(this, | 366 registrar_.Add(this, |
| 372 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, | 367 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, |
| 373 content::NotificationService::AllSources()); | 368 content::NotificationService::AllSources()); |
| 374 } | 369 } |
| 375 | 370 |
| 376 // When we wait for WebUI to be initialized we wait for one of | 371 // When we wait for WebUI to be initialized we wait for one of |
| 377 // these notifications. | 372 // these notifications. |
| 378 if ((waiting_for_user_pods_ || waiting_for_wallpaper_load_) && | 373 if ((waiting_for_user_pods_ || waiting_for_wallpaper_load_) && |
| 379 initialize_webui_hidden_) { | 374 initialize_webui_hidden_) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 // Initiate device policy fetching. | 648 // Initiate device policy fetching. |
| 654 policy::BrowserPolicyConnectorChromeOS* connector = | 649 policy::BrowserPolicyConnectorChromeOS* connector = |
| 655 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 650 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 656 connector->ScheduleServiceInitialization( | 651 connector->ScheduleServiceInitialization( |
| 657 kPolicyServiceInitializationDelayMilliseconds); | 652 kPolicyServiceInitializationDelayMilliseconds); |
| 658 | 653 |
| 659 CHECK(webui_login_display_); | 654 CHECK(webui_login_display_); |
| 660 GetOobeUI()->ShowSigninScreen(context, | 655 GetOobeUI()->ShowSigninScreen(context, |
| 661 webui_login_display_, | 656 webui_login_display_, |
| 662 webui_login_display_); | 657 webui_login_display_); |
| 663 if (chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) | |
| 664 SetStatusAreaVisible(false); | |
| 665 TRACE_EVENT_ASYNC_STEP_INTO0("ui", | 658 TRACE_EVENT_ASYNC_STEP_INTO0("ui", |
| 666 "ShowLoginWebUI", | 659 "ShowLoginWebUI", |
| 667 kShowLoginWebUIid, | 660 kShowLoginWebUIid, |
| 668 "WaitForScreenStateInitialize"); | 661 "WaitForScreenStateInitialize"); |
| 669 BootTimesLoader::Get()->RecordCurrentStats( | 662 BootTimesLoader::Get()->RecordCurrentStats( |
| 670 "login-wait-for-signin-state-initialize"); | 663 "login-wait-for-signin-state-initialize"); |
| 671 } | 664 } |
| 672 | 665 |
| 673 void LoginDisplayHostImpl::ResumeSignInScreen() { | 666 void LoginDisplayHostImpl::ResumeSignInScreen() { |
| 674 // We only get here after a previous call the StartSignInScreen. That sign-in | 667 // We only get here after a previous call the StartSignInScreen. That sign-in |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1286 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1294 new locale_util::SwitchLanguageCallback( | 1287 new locale_util::SwitchLanguageCallback( |
| 1295 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1288 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1296 | 1289 |
| 1297 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1290 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1298 locale_util::SwitchLanguage( | 1291 locale_util::SwitchLanguage( |
| 1299 locale, true, true /* login_layouts_only */, callback.Pass()); | 1292 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1300 } | 1293 } |
| 1301 | 1294 |
| 1302 } // namespace chromeos | 1295 } // namespace chromeos |
| OLD | NEW |