Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: chrome/browser/chromeos/login/login_display_host_impl.cc

Issue 98583004: Added CrOS startup sound. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/login/login_display_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/login_display_host_impl.h" 5 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_controller.h" 9 #include "ash/desktop_background/desktop_background_controller.h"
10 #include "ash/desktop_background/user_wallpaper_delegate.h" 10 #include "ash/desktop_background/user_wallpaper_delegate.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "ui/compositor/scoped_layer_animation_settings.h" 76 #include "ui/compositor/scoped_layer_animation_settings.h"
77 #include "ui/events/event_utils.h" 77 #include "ui/events/event_utils.h"
78 #include "ui/gfx/rect.h" 78 #include "ui/gfx/rect.h"
79 #include "ui/gfx/transform.h" 79 #include "ui/gfx/transform.h"
80 #include "ui/views/focus/focus_manager.h" 80 #include "ui/views/focus/focus_manager.h"
81 #include "ui/views/widget/widget.h" 81 #include "ui/views/widget/widget.h"
82 #include "url/gurl.h" 82 #include "url/gurl.h"
83 83
84 namespace { 84 namespace {
85 85
86 const int kStartupSoundInitialDelayMs = 500; 86 // Following delays specify time window for startup sound.
87 const int kMinDelayAfterLoginPromptVisibleMs = 500;
88
89 const int kMaxDelayAfterLoginPromptVisibleMs = 2000;
dzhioev (left Google) 2013/12/03 08:28:32 Rename these constants to names containing 'Sound'
ygorshenin1 2013/12/03 09:03:28 Done.
87 90
88 // URL which corresponds to the login WebUI. 91 // URL which corresponds to the login WebUI.
89 const char kLoginURL[] = "chrome://oobe/login"; 92 const char kLoginURL[] = "chrome://oobe/login";
90 93
91 // URL which corresponds to the OOBE WebUI. 94 // URL which corresponds to the OOBE WebUI.
92 const char kOobeURL[] = "chrome://oobe/oobe"; 95 const char kOobeURL[] = "chrome://oobe/oobe";
93 96
94 // URL which corresponds to the user adding WebUI. 97 // URL which corresponds to the user adding WebUI.
95 const char kUserAddingURL[] = "chrome://oobe/user-adding"; 98 const char kUserAddingURL[] = "chrome://oobe/user-adding";
96 99
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 login_view_(NULL), 260 login_view_(NULL),
258 webui_login_display_(NULL), 261 webui_login_display_(NULL),
259 is_showing_login_(false), 262 is_showing_login_(false),
260 is_wallpaper_loaded_(false), 263 is_wallpaper_loaded_(false),
261 status_area_saved_visibility_(false), 264 status_area_saved_visibility_(false),
262 crash_count_(0), 265 crash_count_(0),
263 restore_path_(RESTORE_UNKNOWN), 266 restore_path_(RESTORE_UNKNOWN),
264 auto_enrollment_check_done_(false), 267 auto_enrollment_check_done_(false),
265 finalize_animation_type_(ANIMATION_WORKSPACE), 268 finalize_animation_type_(ANIMATION_WORKSPACE),
266 animation_weak_ptr_factory_(this), 269 animation_weak_ptr_factory_(this),
267 startup_sound_requested_(false),
268 startup_sound_played_(false), 270 startup_sound_played_(false),
269 startup_sound_honors_spoken_feedback_(false) { 271 startup_sound_honors_spoken_feedback_(false) {
270 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this); 272 DBusThreadManager::Get()->GetSessionManagerClient()->AddObserver(this);
273 CrasAudioHandler::Get()->AddAudioObserver(this);
271 274
272 // We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING 275 // We need to listen to CLOSE_ALL_BROWSERS_REQUEST but not APP_TERMINATING
273 // because/ APP_TERMINATING will never be fired as long as this keeps 276 // because/ APP_TERMINATING will never be fired as long as this keeps
274 // ref-count. CLOSE_ALL_BROWSERS_REQUEST is safe here because there will be no 277 // ref-count. CLOSE_ALL_BROWSERS_REQUEST is safe here because there will be no
275 // browser instance that will block the shutdown. 278 // browser instance that will block the shutdown.
276 registrar_.Add(this, 279 registrar_.Add(this,
277 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST, 280 chrome::NOTIFICATION_CLOSE_ALL_BROWSERS_REQUEST,
278 content::NotificationService::AllSources()); 281 content::NotificationService::AllSources());
279 282
280 // NOTIFICATION_BROWSER_OPENED is issued after browser is created, but 283 // NOTIFICATION_BROWSER_OPENED is issued after browser is created, but
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, 349 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE,
347 content::NotificationService::AllSources()); 350 content::NotificationService::AllSources());
348 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN, 351 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_NETWORK_ERROR_SHOWN,
349 content::NotificationService::AllSources()); 352 content::NotificationService::AllSources());
350 } 353 }
351 LOG(WARNING) << "Login WebUI >> " 354 LOG(WARNING) << "Login WebUI >> "
352 << "zero_delay: " << zero_delay_enabled 355 << "zero_delay: " << zero_delay_enabled
353 << " wait_for_wp_load_: " << waiting_for_wallpaper_load_ 356 << " wait_for_wp_load_: " << waiting_for_wallpaper_load_
354 << " wait_for_pods_: " << waiting_for_user_pods_ 357 << " wait_for_pods_: " << waiting_for_user_pods_
355 << " init_webui_hidden_: " << initialize_webui_hidden_; 358 << " init_webui_hidden_: " << initialize_webui_hidden_;
359
360 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
361 std::vector<base::StringPiece> sound_resources(
dzhioev (left Google) 2013/12/03 08:28:32 I think it's safer to use std::map instead of std:
ygorshenin1 2013/12/03 09:03:28 We have a separate issue for this: crbug.com/32133
362 media::SoundsManager::SOUND_COUNT);
363 sound_resources[media::SoundsManager::SOUND_STARTUP] =
364 bundle.GetRawDataResource(IDR_SOUND_STARTUP_WAV);
365 sound_resources[media::SoundsManager::SOUND_LOCK] =
366 bundle.GetRawDataResource(IDR_SOUND_LOCK_WAV);
367 sound_resources[media::SoundsManager::SOUND_UNLOCK] =
368 bundle.GetRawDataResource(IDR_SOUND_UNLOCK_WAV);
369 sound_resources[media::SoundsManager::SOUND_SHUTDOWN] =
dzhioev (left Google) 2013/12/03 08:28:32 Do we need load all the sounds? We play only SOUND
ygorshenin1 2013/12/03 09:03:28 We have a separate issue for this: crbug.com/32133
370 bundle.GetRawDataResource(IDR_SOUND_SHUTDOWN_WAV);
371 for (size_t i = 0; i < sound_resources.size(); ++i) {
372 DCHECK(!sound_resources[i].empty()) << "System sound " << i << " "
373 << "missing.";
374 }
375 if (!media::SoundsManager::Get()->Initialize(sound_resources))
dzhioev (left Google) 2013/12/03 08:28:32 Why SoundsManager can't initialize by itself? I me
ygorshenin1 2013/12/03 09:03:28 Because it lives in media/ and has no idea about r
376 LOG(ERROR) << "Failed to initialize SoundsManager.";
356 } 377 }
357 378
358 LoginDisplayHostImpl::~LoginDisplayHostImpl() { 379 LoginDisplayHostImpl::~LoginDisplayHostImpl() {
359 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this); 380 DBusThreadManager::Get()->GetSessionManagerClient()->RemoveObserver(this);
381 CrasAudioHandler::Get()->RemoveAudioObserver(this);
360 382
361 views::FocusManager::set_arrow_key_traversal_enabled(false); 383 views::FocusManager::set_arrow_key_traversal_enabled(false);
362 ResetLoginWindowAndView(); 384 ResetLoginWindowAndView();
363 385
364 // Let chrome process exit after login/oobe screen if needed. 386 // Let chrome process exit after login/oobe screen if needed.
365 chrome::EndKeepAlive(); 387 chrome::EndKeepAlive();
366 388
367 default_host_ = NULL; 389 default_host_ = NULL;
368 // TODO(dzhioev): find better place for starting tutorial. 390 // TODO(dzhioev): find better place for starting tutorial.
369 CommandLine* command_line = CommandLine::ForCurrentProcess(); 391 CommandLine* command_line = CommandLine::ForCurrentProcess();
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 auto_enrollment_client_->should_auto_enroll()); 503 auto_enrollment_client_->should_auto_enroll());
482 return; 504 return;
483 } 505 }
484 506
485 get_auto_enrollment_result_callbacks_.push_back(callback); 507 get_auto_enrollment_result_callbacks_.push_back(callback);
486 } 508 }
487 509
488 void LoginDisplayHostImpl::StartWizard( 510 void LoginDisplayHostImpl::StartWizard(
489 const std::string& first_screen_name, 511 const std::string& first_screen_name,
490 scoped_ptr<DictionaryValue> screen_parameters) { 512 scoped_ptr<DictionaryValue> screen_parameters) {
491 TryToPlayStartupSound(false); 513 startup_sound_honors_spoken_feedback_ = false;
514 TryToPlayStartupSound();
492 515
493 // Keep parameters to restore if renderer crashes. 516 // Keep parameters to restore if renderer crashes.
494 restore_path_ = RESTORE_WIZARD; 517 restore_path_ = RESTORE_WIZARD;
495 wizard_first_screen_name_ = first_screen_name; 518 wizard_first_screen_name_ = first_screen_name;
496 if (screen_parameters.get()) 519 if (screen_parameters.get())
497 wizard_screen_parameters_.reset(screen_parameters->DeepCopy()); 520 wizard_screen_parameters_.reset(screen_parameters->DeepCopy());
498 else 521 else
499 wizard_screen_parameters_.reset(); 522 wizard_screen_parameters_.reset();
500 is_showing_login_ = false; 523 is_showing_login_ = false;
501 524
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 sign_in_controller_->Init( 579 sign_in_controller_->Init(
557 chromeos::UserManager::Get()->GetUsersAdmittedForMultiProfile()); 580 chromeos::UserManager::Get()->GetUsersAdmittedForMultiProfile());
558 CHECK(webui_login_display_); 581 CHECK(webui_login_display_);
559 GetOobeUI()->ShowSigninScreen(LoginScreenContext(), 582 GetOobeUI()->ShowSigninScreen(LoginScreenContext(),
560 webui_login_display_, 583 webui_login_display_,
561 webui_login_display_); 584 webui_login_display_);
562 } 585 }
563 586
564 void LoginDisplayHostImpl::StartSignInScreen( 587 void LoginDisplayHostImpl::StartSignInScreen(
565 const LoginScreenContext& context) { 588 const LoginScreenContext& context) {
566 TryToPlayStartupSound(true); 589 startup_sound_honors_spoken_feedback_ = true;
590 TryToPlayStartupSound();
567 591
568 restore_path_ = RESTORE_SIGN_IN; 592 restore_path_ = RESTORE_SIGN_IN;
569 is_showing_login_ = true; 593 is_showing_login_ = true;
570 finalize_animation_type_ = ANIMATION_WORKSPACE; 594 finalize_animation_type_ = ANIMATION_WORKSPACE;
571 595
572 PrewarmAuthentication(); 596 PrewarmAuthentication();
573 597
574 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) { 598 if (waiting_for_wallpaper_load_ && !initialize_webui_hidden_) {
575 LOG(WARNING) << "Login WebUI >> sign in postponed"; 599 LOG(WARNING) << "Login WebUI >> sign in postponed";
576 return; 600 return;
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 webui_login_display_->OnPreferencesChanged(); 674 webui_login_display_->OnPreferencesChanged();
651 } 675 }
652 676
653 void LoginDisplayHostImpl::PrewarmAuthentication() { 677 void LoginDisplayHostImpl::PrewarmAuthentication() {
654 auth_prewarmer_.reset(new AuthPrewarmer()); 678 auth_prewarmer_.reset(new AuthPrewarmer());
655 auth_prewarmer_->PrewarmAuthentication( 679 auth_prewarmer_->PrewarmAuthentication(
656 base::Bind(&LoginDisplayHostImpl::OnAuthPrewarmDone, 680 base::Bind(&LoginDisplayHostImpl::OnAuthPrewarmDone,
657 pointer_factory_.GetWeakPtr())); 681 pointer_factory_.GetWeakPtr()));
658 } 682 }
659 683
660 void LoginDisplayHostImpl::StartAppLaunch(const std::string& app_id) { 684 void LoginDisplayHostImpl::StartAppLaunch(const std::string& app_id) {
dzhioev (left Google) 2013/12/03 08:28:32 What's about this method?
ygorshenin1 2013/12/03 09:03:28 Could you please paraphrase your question? On 201
dzhioev (left Google) 2013/12/03 09:14:29 Don't we want to play startup sound in this mode?
ygorshenin1 2013/12/03 09:24:51 As you can see from the bug description (crbug.com
661 LOG(WARNING) << "Login WebUI >> start app launch."; 685 LOG(WARNING) << "Login WebUI >> start app launch.";
662 SetStatusAreaVisible(false); 686 SetStatusAreaVisible(false);
663 finalize_animation_type_ = ANIMATION_FADE_OUT; 687 finalize_animation_type_ = ANIMATION_FADE_OUT;
664 if (!login_window_) 688 if (!login_window_)
665 LoadURL(GURL(kAppLaunchSplashURL)); 689 LoadURL(GURL(kAppLaunchSplashURL));
666 690
667 login_view_->set_should_emit_login_prompt_visible(false); 691 login_view_->set_should_emit_login_prompt_visible(false);
668 692
669 app_launch_controller_.reset(new AppLaunchController( 693 app_launch_controller_.reset(new AppLaunchController(
670 app_id, this, GetOobeUI())); 694 app_id, this, GetOobeUI()));
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 } 804 }
781 805
782 //////////////////////////////////////////////////////////////////////////////// 806 ////////////////////////////////////////////////////////////////////////////////
783 // LoginDisplayHostImpl, chromeos::SessionManagerClient::Observer 807 // LoginDisplayHostImpl, chromeos::SessionManagerClient::Observer
784 // implementation: 808 // implementation:
785 809
786 void LoginDisplayHostImpl::EmitLoginPromptVisibleCalled() { 810 void LoginDisplayHostImpl::EmitLoginPromptVisibleCalled() {
787 OnLoginPromptVisible(); 811 OnLoginPromptVisible();
788 } 812 }
789 813
814 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() {
815 TryToPlayStartupSound();
816 }
817
790 //////////////////////////////////////////////////////////////////////////////// 818 ////////////////////////////////////////////////////////////////////////////////
791 // LoginDisplayHostImpl, private 819 // LoginDisplayHostImpl, private
792 820
793 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) { 821 void LoginDisplayHostImpl::ShutdownDisplayHost(bool post_quit_task) {
794 if (shutting_down_) 822 if (shutting_down_)
795 return; 823 return;
796 824
797 shutting_down_ = true; 825 shutting_down_ = true;
798 registrar_.RemoveAll(); 826 registrar_.RemoveAll();
799 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 827 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 } 1031 }
1004 1032
1005 void LoginDisplayHostImpl::NotifyAutoEnrollmentCheckResult( 1033 void LoginDisplayHostImpl::NotifyAutoEnrollmentCheckResult(
1006 bool should_auto_enroll) { 1034 bool should_auto_enroll) {
1007 std::vector<GetAutoEnrollmentCheckResultCallback> callbacks; 1035 std::vector<GetAutoEnrollmentCheckResultCallback> callbacks;
1008 callbacks.swap(get_auto_enrollment_result_callbacks_); 1036 callbacks.swap(get_auto_enrollment_result_callbacks_);
1009 for (size_t i = 0; i < callbacks.size(); ++i) 1037 for (size_t i = 0; i < callbacks.size(); ++i)
1010 callbacks[i].Run(should_auto_enroll); 1038 callbacks[i].Run(should_auto_enroll);
1011 } 1039 }
1012 1040
1013 void LoginDisplayHostImpl::TryToPlayStartupSound(bool honor_spoken_feedback) { 1041 void LoginDisplayHostImpl::TryToPlayStartupSound() {
1014 if (startup_sound_requested_) 1042 if (login_prompt_visible_time_.is_null())
1015 return; 1043 return;
1016 startup_sound_requested_ = true; 1044 if (!CrasAudioHandler::Get()->GetActiveOutputNode())
1017 startup_sound_honors_spoken_feedback_ = honor_spoken_feedback; 1045 return;
1018 if (!login_prompt_visible_time_.is_null()) 1046 PlayStartupSound();
1019 PlayStartupSound();
1020 } 1047 }
1021 1048
1022 void LoginDisplayHostImpl::OnLoginPromptVisible() { 1049 void LoginDisplayHostImpl::OnLoginPromptVisible() {
1023 if (!login_prompt_visible_time_.is_null()) 1050 if (!login_prompt_visible_time_.is_null())
1024 return; 1051 return;
1025
1026 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
1027 std::vector<base::StringPiece> sound_resources(
1028 media::SoundsManager::SOUND_COUNT);
1029 sound_resources[media::SoundsManager::SOUND_STARTUP] =
1030 bundle.GetRawDataResource(IDR_SOUND_STARTUP_WAV);
1031 sound_resources[media::SoundsManager::SOUND_LOCK] =
1032 bundle.GetRawDataResource(IDR_SOUND_LOCK_WAV);
1033 sound_resources[media::SoundsManager::SOUND_UNLOCK] =
1034 bundle.GetRawDataResource(IDR_SOUND_UNLOCK_WAV);
1035 sound_resources[media::SoundsManager::SOUND_SHUTDOWN] =
1036 bundle.GetRawDataResource(IDR_SOUND_SHUTDOWN_WAV);
1037 for (size_t i = 0; i < sound_resources.size(); ++i) {
1038 DCHECK(!sound_resources[i].empty()) << "System sound " << i << " "
1039 << "missing.";
1040 }
1041 if (!media::SoundsManager::Get()->Initialize(sound_resources))
1042 LOG(ERROR) << "Failed to initialize SoundsManager.";
1043
1044 login_prompt_visible_time_ = base::TimeTicks::Now(); 1052 login_prompt_visible_time_ = base::TimeTicks::Now();
1045 if (startup_sound_requested_ && !startup_sound_played_) 1053 TryToPlayStartupSound();
1046 PlayStartupSound();
1047 } 1054 }
1048 1055
1049 void LoginDisplayHostImpl::PlayStartupSound() { 1056 void LoginDisplayHostImpl::PlayStartupSound() {
dzhioev (left Google) 2013/12/03 08:28:32 Why it's called PlayStartupSound if it doesn't pla
ygorshenin1 2013/12/03 09:03:28 Good point, done.
1050 if (startup_sound_played_) 1057 if (startup_sound_played_)
1051 return; 1058 return;
1052 startup_sound_played_ = true; 1059 startup_sound_played_ = true;
1053 1060
1054 // TODO (ygorshenin@): remove this as soon as crbug.com/315108 will
1055 // be fixed.
1056 return;
1057
1058 const base::TimeDelta delay = 1061 const base::TimeDelta delay =
1059 base::TimeDelta::FromMilliseconds(kStartupSoundInitialDelayMs); 1062 base::TimeDelta::FromMilliseconds(kMinDelayAfterLoginPromptVisibleMs);
1060 const base::TimeDelta delta = 1063 const base::TimeDelta delta =
dzhioev (left Google) 2013/12/03 08:28:32 Please rename delay and delta to something more me
ygorshenin1 2013/12/03 09:03:28 Done.
1061 base::TimeTicks::Now() - login_prompt_visible_time_; 1064 base::TimeTicks::Now() - login_prompt_visible_time_;
1062 1065
1066 // Don't play startup sound if login prompt is already visible for a
1067 // long time.
1068 if (delta >
1069 base::TimeDelta::FromMilliseconds(kMaxDelayAfterLoginPromptVisibleMs)) {
1070 return;
1071 }
1072
1063 // Cras audio server starts initialization after 1073 // Cras audio server starts initialization after
1064 // login-prompt-visible signal from session manager. Alas, but it 1074 // login-prompt-visible signal from session manager. Alas, but it
1065 // doesn't send notifications after initialization. Thus, we're 1075 // doesn't send notifications after initialization. Thus, we're
1066 // trying to play startup sound after some delay. 1076 // trying to play startup sound after some delay.
1067 if (delta > delay) { 1077 if (delta > delay) {
dzhioev (left Google) 2013/12/03 08:28:32 >=
ygorshenin1 2013/12/03 09:03:28 I thought these variables will be equal with proba
1068 PlayStartupSoundHelper(startup_sound_honors_spoken_feedback_); 1078 PlayStartupSoundHelper(startup_sound_honors_spoken_feedback_);
dzhioev (left Google) 2013/12/03 08:28:32 It's a bad name for function. Please rename.
ygorshenin1 2013/12/03 09:03:28 Done.
1069 } else { 1079 } else {
1070 base::MessageLoop::current()->PostDelayedTask( 1080 base::MessageLoop::current()->PostDelayedTask(
1071 FROM_HERE, 1081 FROM_HERE,
1072 base::Bind(&PlayStartupSoundHelper, 1082 base::Bind(&PlayStartupSoundHelper,
1073 startup_sound_honors_spoken_feedback_), 1083 startup_sound_honors_spoken_feedback_),
1074 delay - delta); 1084 delay - delta);
1075 } 1085 }
1076 } 1086 }
1077 1087
1078 //////////////////////////////////////////////////////////////////////////////// 1088 ////////////////////////////////////////////////////////////////////////////////
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 1208
1199 scoped_ptr<locale_util::SwitchLanguageCallback> callback( 1209 scoped_ptr<locale_util::SwitchLanguageCallback> callback(
1200 new locale_util::SwitchLanguageCallback( 1210 new locale_util::SwitchLanguageCallback(
1201 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); 1211 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass()))));
1202 1212
1203 // Do not load locale keyboards here. 1213 // Do not load locale keyboards here.
1204 locale_util::SwitchLanguage(locale, false, callback.Pass()); 1214 locale_util::SwitchLanguage(locale, false, callback.Pass());
1205 } 1215 }
1206 1216
1207 } // namespace chromeos 1217 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_display_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698