| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // these notifications. | 380 // these notifications. |
| 381 if ((waiting_for_user_pods_ || waiting_for_wallpaper_load_) && | 381 if ((waiting_for_user_pods_ || waiting_for_wallpaper_load_) && |
| 382 initialize_webui_hidden_) { | 382 initialize_webui_hidden_) { |
| 383 registrar_.Add(this, | 383 registrar_.Add(this, |
| 384 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, | 384 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, |
| 385 content::NotificationService::AllSources()); | 385 content::NotificationService::AllSources()); |
| 386 registrar_.Add(this, | 386 registrar_.Add(this, |
| 387 chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN, | 387 chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN, |
| 388 content::NotificationService::AllSources()); | 388 content::NotificationService::AllSources()); |
| 389 } | 389 } |
| 390 LOG(WARNING) << "Login WebUI >> " | 390 VLOG(1) << "Login WebUI >> " |
| 391 << "zero_delay: " << zero_delay_enabled | 391 << "zero_delay: " << zero_delay_enabled |
| 392 << " wait_for_wp_load_: " << waiting_for_wallpaper_load_ | 392 << " wait_for_wp_load_: " << waiting_for_wallpaper_load_ |
| 393 << " wait_for_pods_: " << waiting_for_user_pods_ | 393 << " wait_for_pods_: " << waiting_for_user_pods_ |
| 394 << " init_webui_hidden_: " << initialize_webui_hidden_; | 394 << " init_webui_hidden_: " << initialize_webui_hidden_; |
| 395 | 395 |
| 396 media::SoundsManager* manager = media::SoundsManager::Get(); | 396 media::SoundsManager* manager = media::SoundsManager::Get(); |
| 397 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 397 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 398 manager->Initialize(chromeos::SOUND_STARTUP, | 398 manager->Initialize(chromeos::SOUND_STARTUP, |
| 399 bundle.GetRawDataResource(IDR_SOUND_STARTUP_WAV)); | 399 bundle.GetRawDataResource(IDR_SOUND_STARTUP_WAV)); |
| 400 } | 400 } |
| 401 | 401 |
| 402 LoginDisplayHostImpl::~LoginDisplayHostImpl() { | 402 LoginDisplayHostImpl::~LoginDisplayHostImpl() { |
| 403 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); | 403 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); |
| 404 CrasAudioHandler::Get()->RemoveAudioObserver(this); | 404 CrasAudioHandler::Get()->RemoveAudioObserver(this); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 // Keep parameters to restore if renderer crashes. | 521 // Keep parameters to restore if renderer crashes. |
| 522 restore_path_ = RESTORE_WIZARD; | 522 restore_path_ = RESTORE_WIZARD; |
| 523 wizard_first_screen_name_ = first_screen_name; | 523 wizard_first_screen_name_ = first_screen_name; |
| 524 if (screen_parameters.get()) | 524 if (screen_parameters.get()) |
| 525 wizard_screen_parameters_.reset(screen_parameters->DeepCopy()); | 525 wizard_screen_parameters_.reset(screen_parameters->DeepCopy()); |
| 526 else | 526 else |
| 527 wizard_screen_parameters_.reset(); | 527 wizard_screen_parameters_.reset(); |
| 528 is_showing_login_ = false; | 528 is_showing_login_ = false; |
| 529 | 529 |
| 530 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { | 530 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { |
| 531 LOG(WARNING) << "Login WebUI >> wizard postponed"; | 531 VLOG(1) << "Login WebUI >> wizard postponed"; |
| 532 return; | 532 return; |
| 533 } | 533 } |
| 534 LOG(WARNING) << "Login WebUI >> wizard"; | 534 VLOG(1) << "Login WebUI >> wizard"; |
| 535 | 535 |
| 536 if (!login_window_) | 536 if (!login_window_) |
| 537 LoadURL(GURL(kOobeURL)); | 537 LoadURL(GURL(kOobeURL)); |
| 538 | 538 |
| 539 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; | 539 DVLOG(1) << "Starting wizard, first_screen_name: " << first_screen_name; |
| 540 // Create and show the wizard. | 540 // Create and show the wizard. |
| 541 // Note, dtor of the old WizardController should be called before ctor of the | 541 // Note, dtor of the old WizardController should be called before ctor of the |
| 542 // new one, because "default_controller()" is updated there. So pure "reset()" | 542 // new one, because "default_controller()" is updated there. So pure "reset()" |
| 543 // is done before new controller creation. | 543 // is done before new controller creation. |
| 544 wizard_controller_.reset(); | 544 wizard_controller_.reset(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 558 } | 558 } |
| 559 | 559 |
| 560 void LoginDisplayHostImpl::StartUserAdding( | 560 void LoginDisplayHostImpl::StartUserAdding( |
| 561 const base::Closure& completion_callback) { | 561 const base::Closure& completion_callback) { |
| 562 if (login::LoginScrollIntoViewEnabled()) | 562 if (login::LoginScrollIntoViewEnabled()) |
| 563 DisableKeyboardOverscroll(); | 563 DisableKeyboardOverscroll(); |
| 564 | 564 |
| 565 restore_path_ = RESTORE_ADD_USER_INTO_SESSION; | 565 restore_path_ = RESTORE_ADD_USER_INTO_SESSION; |
| 566 completion_callback_ = completion_callback; | 566 completion_callback_ = completion_callback; |
| 567 finalize_animation_type_ = ANIMATION_NONE; | 567 finalize_animation_type_ = ANIMATION_NONE; |
| 568 LOG(WARNING) << "Login WebUI >> user adding"; | 568 VLOG(1) << "Login WebUI >> user adding"; |
| 569 if (!login_window_) | 569 if (!login_window_) |
| 570 LoadURL(GURL(kUserAddingURL)); | 570 LoadURL(GURL(kUserAddingURL)); |
| 571 // We should emit this signal only at login screen (after reboot or sign out). | 571 // We should emit this signal only at login screen (after reboot or sign out). |
| 572 login_view_->set_should_emit_login_prompt_visible(false); | 572 login_view_->set_should_emit_login_prompt_visible(false); |
| 573 | 573 |
| 574 // Lock container can be transparent after lock screen animation. | 574 // Lock container can be transparent after lock screen animation. |
| 575 aura::Window* lock_container = ash::Shell::GetContainer( | 575 aura::Window* lock_container = ash::Shell::GetContainer( |
| 576 ash::Shell::GetPrimaryRootWindow(), | 576 ash::Shell::GetPrimaryRootWindow(), |
| 577 ash::kShellWindowId_LockScreenContainersContainer); | 577 ash::kShellWindowId_LockScreenContainersContainer); |
| 578 lock_container->layer()->SetOpacity(1.0); | 578 lock_container->layer()->SetOpacity(1.0); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 600 startup_sound_honors_spoken_feedback_ = true; | 600 startup_sound_honors_spoken_feedback_ = true; |
| 601 TryToPlayStartupSound(); | 601 TryToPlayStartupSound(); |
| 602 | 602 |
| 603 restore_path_ = RESTORE_SIGN_IN; | 603 restore_path_ = RESTORE_SIGN_IN; |
| 604 is_showing_login_ = true; | 604 is_showing_login_ = true; |
| 605 finalize_animation_type_ = ANIMATION_WORKSPACE; | 605 finalize_animation_type_ = ANIMATION_WORKSPACE; |
| 606 | 606 |
| 607 PrewarmAuthentication(); | 607 PrewarmAuthentication(); |
| 608 | 608 |
| 609 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { | 609 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { |
| 610 LOG(WARNING) << "Login WebUI >> sign in postponed"; | 610 VLOG(1) << "Login WebUI >> sign in postponed"; |
| 611 return; | 611 return; |
| 612 } | 612 } |
| 613 LOG(WARNING) << "Login WebUI >> sign in"; | 613 VLOG(1) << "Login WebUI >> sign in"; |
| 614 | 614 |
| 615 if (!login_window_) { | 615 if (!login_window_) { |
| 616 TRACE_EVENT_ASYNC_BEGIN0("ui", "ShowLoginWebUI", kShowLoginWebUIid); | 616 TRACE_EVENT_ASYNC_BEGIN0("ui", "ShowLoginWebUI", kShowLoginWebUIid); |
| 617 TRACE_EVENT_ASYNC_STEP_INTO0( | 617 TRACE_EVENT_ASYNC_STEP_INTO0( |
| 618 "ui", "ShowLoginWebUI", kShowLoginWebUIid, "StartSignInScreen"); | 618 "ui", "ShowLoginWebUI", kShowLoginWebUIid, "StartSignInScreen"); |
| 619 BootTimesLoader::Get()->RecordCurrentStats("login-start-signin-screen"); | 619 BootTimesLoader::Get()->RecordCurrentStats("login-start-signin-screen"); |
| 620 LoadURL(GURL(kLoginURL)); | 620 LoadURL(GURL(kLoginURL)); |
| 621 } | 621 } |
| 622 | 622 |
| 623 DVLOG(1) << "Starting sign in screen"; | 623 DVLOG(1) << "Starting sign in screen"; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 } | 688 } |
| 689 | 689 |
| 690 void LoginDisplayHostImpl::PrewarmAuthentication() { | 690 void LoginDisplayHostImpl::PrewarmAuthentication() { |
| 691 auth_prewarmer_.reset(new AuthPrewarmer()); | 691 auth_prewarmer_.reset(new AuthPrewarmer()); |
| 692 auth_prewarmer_->PrewarmAuthentication( | 692 auth_prewarmer_->PrewarmAuthentication( |
| 693 base::Bind(&LoginDisplayHostImpl::OnAuthPrewarmDone, | 693 base::Bind(&LoginDisplayHostImpl::OnAuthPrewarmDone, |
| 694 pointer_factory_.GetWeakPtr())); | 694 pointer_factory_.GetWeakPtr())); |
| 695 } | 695 } |
| 696 | 696 |
| 697 void LoginDisplayHostImpl::StartDemoAppLaunch() { | 697 void LoginDisplayHostImpl::StartDemoAppLaunch() { |
| 698 LOG(WARNING) << "Login WebUI >> starting demo app."; | 698 VLOG(1) << "Login WebUI >> starting demo app."; |
| 699 SetStatusAreaVisible(false); | 699 SetStatusAreaVisible(false); |
| 700 | 700 |
| 701 demo_app_launcher_.reset(new DemoAppLauncher()); | 701 demo_app_launcher_.reset(new DemoAppLauncher()); |
| 702 demo_app_launcher_->StartDemoAppLaunch(); | 702 demo_app_launcher_->StartDemoAppLaunch(); |
| 703 } | 703 } |
| 704 | 704 |
| 705 void LoginDisplayHostImpl::StartAppLaunch(const std::string& app_id, | 705 void LoginDisplayHostImpl::StartAppLaunch(const std::string& app_id, |
| 706 bool diagnostic_mode) { | 706 bool diagnostic_mode) { |
| 707 LOG(WARNING) << "Login WebUI >> start app launch."; | 707 VLOG(1) << "Login WebUI >> start app launch."; |
| 708 SetStatusAreaVisible(false); | 708 SetStatusAreaVisible(false); |
| 709 finalize_animation_type_ = ANIMATION_FADE_OUT; | 709 finalize_animation_type_ = ANIMATION_FADE_OUT; |
| 710 if (!login_window_) | 710 if (!login_window_) |
| 711 LoadURL(GURL(kAppLaunchSplashURL)); | 711 LoadURL(GURL(kAppLaunchSplashURL)); |
| 712 | 712 |
| 713 login_view_->set_should_emit_login_prompt_visible(false); | 713 login_view_->set_should_emit_login_prompt_visible(false); |
| 714 | 714 |
| 715 app_launch_controller_.reset(new AppLaunchController( | 715 app_launch_controller_.reset(new AppLaunchController( |
| 716 app_id, diagnostic_mode, this, GetOobeUI())); | 716 app_id, diagnostic_mode, this, GetOobeUI())); |
| 717 | 717 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 739 } | 739 } |
| 740 | 740 |
| 741 //////////////////////////////////////////////////////////////////////////////// | 741 //////////////////////////////////////////////////////////////////////////////// |
| 742 // LoginDisplayHostImpl, content:NotificationObserver implementation: | 742 // LoginDisplayHostImpl, content:NotificationObserver implementation: |
| 743 | 743 |
| 744 void LoginDisplayHostImpl::Observe( | 744 void LoginDisplayHostImpl::Observe( |
| 745 int type, | 745 int type, |
| 746 const content::NotificationSource& source, | 746 const content::NotificationSource& source, |
| 747 const content::NotificationDetails& details) { | 747 const content::NotificationDetails& details) { |
| 748 if (chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED == type) { | 748 if (chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED == type) { |
| 749 LOG(WARNING) << "Login WebUI >> wp animation done"; | 749 VLOG(1) << "Login WebUI >> wp animation done"; |
| 750 is_wallpaper_loaded_ = true; | 750 is_wallpaper_loaded_ = true; |
| 751 ash::Shell::GetInstance()->user_wallpaper_delegate() | 751 ash::Shell::GetInstance()->user_wallpaper_delegate() |
| 752 ->OnWallpaperBootAnimationFinished(); | 752 ->OnWallpaperBootAnimationFinished(); |
| 753 if (waiting_for_wallpaper_load_) { | 753 if (waiting_for_wallpaper_load_) { |
| 754 // StartWizard / StartSignInScreen could be called multiple times through | 754 // StartWizard / StartSignInScreen could be called multiple times through |
| 755 // the lifetime of host. | 755 // the lifetime of host. |
| 756 // Make sure that subsequent calls are not postponed. | 756 // Make sure that subsequent calls are not postponed. |
| 757 waiting_for_wallpaper_load_ = false; | 757 waiting_for_wallpaper_load_ = false; |
| 758 if (initialize_webui_hidden_) | 758 if (initialize_webui_hidden_) |
| 759 ShowWebUI(); | 759 ShowWebUI(); |
| 760 else | 760 else |
| 761 StartPostponedWebUI(); | 761 StartPostponedWebUI(); |
| 762 } | 762 } |
| 763 registrar_.Remove(this, | 763 registrar_.Remove(this, |
| 764 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, | 764 chrome::NOTIFICATION_WALLPAPER_ANIMATION_FINISHED, |
| 765 content::NotificationService::AllSources()); | 765 content::NotificationService::AllSources()); |
| 766 } else if (chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE == type || | 766 } else if (chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE == type || |
| 767 chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN == type) { | 767 chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN == type) { |
| 768 LOG(WARNING) << "Login WebUI >> WEBUI_VISIBLE"; | 768 VLOG(1) << "Login WebUI >> WEBUI_VISIBLE"; |
| 769 if (waiting_for_user_pods_ && initialize_webui_hidden_) { | 769 if (waiting_for_user_pods_ && initialize_webui_hidden_) { |
| 770 waiting_for_user_pods_ = false; | 770 waiting_for_user_pods_ = false; |
| 771 ShowWebUI(); | 771 ShowWebUI(); |
| 772 } else if (waiting_for_wallpaper_load_ && initialize_webui_hidden_) { | 772 } else if (waiting_for_wallpaper_load_ && initialize_webui_hidden_) { |
| 773 // Reduce time till login UI is shown - show it as soon as possible. | 773 // Reduce time till login UI is shown - show it as soon as possible. |
| 774 waiting_for_wallpaper_load_ = false; | 774 waiting_for_wallpaper_load_ = false; |
| 775 ShowWebUI(); | 775 ShowWebUI(); |
| 776 } | 776 } |
| 777 registrar_.Remove(this, | 777 registrar_.Remove(this, |
| 778 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, | 778 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 // if it is visible. | 980 // if it is visible. |
| 981 // See crbug.com/328538. | 981 // See crbug.com/328538. |
| 982 ChargerReplacementDialog::SetFocusOnChargerDialogIfVisible(); | 982 ChargerReplacementDialog::SetFocusOnChargerDialogIfVisible(); |
| 983 } | 983 } |
| 984 | 984 |
| 985 void LoginDisplayHostImpl::ShowWebUI() { | 985 void LoginDisplayHostImpl::ShowWebUI() { |
| 986 if (!login_window_ || !login_view_) { | 986 if (!login_window_ || !login_view_) { |
| 987 NOTREACHED(); | 987 NOTREACHED(); |
| 988 return; | 988 return; |
| 989 } | 989 } |
| 990 LOG(WARNING) << "Login WebUI >> Show already initialized UI"; | 990 VLOG(1) << "Login WebUI >> Show already initialized UI"; |
| 991 login_window_->Show(); | 991 login_window_->Show(); |
| 992 login_view_->GetWebContents()->Focus(); | 992 login_view_->GetWebContents()->Focus(); |
| 993 if (::switches::IsTextInputFocusManagerEnabled()) | 993 if (::switches::IsTextInputFocusManagerEnabled()) |
| 994 login_view_->RequestFocus(); | 994 login_view_->RequestFocus(); |
| 995 login_view_->SetStatusAreaVisible(status_area_saved_visibility_); | 995 login_view_->SetStatusAreaVisible(status_area_saved_visibility_); |
| 996 login_view_->OnPostponedShow(); | 996 login_view_->OnPostponedShow(); |
| 997 | 997 |
| 998 // Login window could be shown after the spring charger dialog shows, and | 998 // Login window could be shown after the spring charger dialog shows, and |
| 999 // take away the focus from it. Set the focus back to the charger dialog | 999 // take away the focus from it. Set the focus back to the charger dialog |
| 1000 // if it is visible. | 1000 // if it is visible. |
| 1001 // See crbug.com/328538. | 1001 // See crbug.com/328538. |
| 1002 ChargerReplacementDialog::SetFocusOnChargerDialogIfVisible(); | 1002 ChargerReplacementDialog::SetFocusOnChargerDialogIfVisible(); |
| 1003 | 1003 |
| 1004 // We should reset this flag to allow changing of status area visibility. | 1004 // We should reset this flag to allow changing of status area visibility. |
| 1005 initialize_webui_hidden_ = false; | 1005 initialize_webui_hidden_ = false; |
| 1006 } | 1006 } |
| 1007 | 1007 |
| 1008 void LoginDisplayHostImpl::StartPostponedWebUI() { | 1008 void LoginDisplayHostImpl::StartPostponedWebUI() { |
| 1009 if (!is_wallpaper_loaded_) { | 1009 if (!is_wallpaper_loaded_) { |
| 1010 NOTREACHED(); | 1010 NOTREACHED(); |
| 1011 return; | 1011 return; |
| 1012 } | 1012 } |
| 1013 LOG(WARNING) << "Login WebUI >> Init postponed WebUI"; | 1013 VLOG(1) << "Login WebUI >> Init postponed WebUI"; |
| 1014 | 1014 |
| 1015 // Wallpaper has finished loading before StartWizard/StartSignInScreen has | 1015 // Wallpaper has finished loading before StartWizard/StartSignInScreen has |
| 1016 // been called. In general this should not happen. | 1016 // been called. In general this should not happen. |
| 1017 // Let go through normal code path when one of those will be called. | 1017 // Let go through normal code path when one of those will be called. |
| 1018 if (restore_path_ == RESTORE_UNKNOWN) { | 1018 if (restore_path_ == RESTORE_UNKNOWN) { |
| 1019 NOTREACHED(); | 1019 NOTREACHED(); |
| 1020 return; | 1020 return; |
| 1021 } | 1021 } |
| 1022 | 1022 |
| 1023 switch (restore_path_) { | 1023 switch (restore_path_) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 wm::ANIMATE_HIDE); | 1076 wm::ANIMATE_HIDE); |
| 1077 | 1077 |
| 1078 login_window_->AddRemovalsObserver(this); | 1078 login_window_->AddRemovalsObserver(this); |
| 1079 login_window_->SetContentsView(login_view_); | 1079 login_window_->SetContentsView(login_view_); |
| 1080 | 1080 |
| 1081 // If WebUI is initialized in hidden state, show it only if we're no | 1081 // If WebUI is initialized in hidden state, show it only if we're no |
| 1082 // longer waiting for wallpaper animation/user images loading. Otherwise, | 1082 // longer waiting for wallpaper animation/user images loading. Otherwise, |
| 1083 // always show it. | 1083 // always show it. |
| 1084 if (!initialize_webui_hidden_ || | 1084 if (!initialize_webui_hidden_ || |
| 1085 (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { | 1085 (!waiting_for_wallpaper_load_ && !waiting_for_user_pods_)) { |
| 1086 LOG(WARNING) << "Login WebUI >> show login wnd on create"; | 1086 VLOG(1) << "Login WebUI >> show login wnd on create"; |
| 1087 login_window_->Show(); | 1087 login_window_->Show(); |
| 1088 } else { | 1088 } else { |
| 1089 LOG(WARNING) << "Login WebUI >> login wnd is hidden on create"; | 1089 VLOG(1) << "Login WebUI >> login wnd is hidden on create"; |
| 1090 login_view_->set_is_hidden(true); | 1090 login_view_->set_is_hidden(true); |
| 1091 } | 1091 } |
| 1092 login_window_->GetNativeView()->SetName("WebUILoginView"); | 1092 login_window_->GetNativeView()->SetName("WebUILoginView"); |
| 1093 } | 1093 } |
| 1094 | 1094 |
| 1095 void LoginDisplayHostImpl::ResetLoginWindowAndView() { | 1095 void LoginDisplayHostImpl::ResetLoginWindowAndView() { |
| 1096 if (!login_window_) | 1096 if (!login_window_) |
| 1097 return; | 1097 return; |
| 1098 login_window_->Close(); | 1098 login_window_->Close(); |
| 1099 login_window_ = NULL; | 1099 login_window_ = NULL; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1268 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1269 new locale_util::SwitchLanguageCallback( | 1269 new locale_util::SwitchLanguageCallback( |
| 1270 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1270 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1271 | 1271 |
| 1272 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1272 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1273 locale_util::SwitchLanguage( | 1273 locale_util::SwitchLanguage( |
| 1274 locale, true, true /* login_layouts_only */, callback.Pass()); | 1274 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 } // namespace chromeos | 1277 } // namespace chromeos |
| OLD | NEW |