| 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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 void LoginDisplayHostImpl::OnAuthPrewarmDone() { | 1115 void LoginDisplayHostImpl::OnAuthPrewarmDone() { |
| 1116 auth_prewarmer_.reset(); | 1116 auth_prewarmer_.reset(); |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void LoginDisplayHostImpl::SetOobeProgressBarVisible(bool visible) { | 1119 void LoginDisplayHostImpl::SetOobeProgressBarVisible(bool visible) { |
| 1120 GetOobeUI()->ShowOobeUI(visible); | 1120 GetOobeUI()->ShowOobeUI(visible); |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 void LoginDisplayHostImpl::TryToPlayStartupSound() { | 1123 void LoginDisplayHostImpl::TryToPlayStartupSound() { |
| 1124 if (startup_sound_played_ || login_prompt_visible_time_.is_null() || | 1124 if (startup_sound_played_ || login_prompt_visible_time_.is_null() || |
| 1125 !CrasAudioHandler::Get()->GetActiveOutputNode()) { | 1125 !CrasAudioHandler::Get()->GetPrimaryActiveOutputNode()) { |
| 1126 return; | 1126 return; |
| 1127 } | 1127 } |
| 1128 | 1128 |
| 1129 startup_sound_played_ = true; | 1129 startup_sound_played_ = true; |
| 1130 | 1130 |
| 1131 // Don't try play startup sound if login prompt is already visible | 1131 // Don't try play startup sound if login prompt is already visible |
| 1132 // for a long time or can't be played. | 1132 // for a long time or can't be played. |
| 1133 if (base::TimeTicks::Now() - login_prompt_visible_time_ > | 1133 if (base::TimeTicks::Now() - login_prompt_visible_time_ > |
| 1134 base::TimeDelta::FromMilliseconds(kStartupSoundMaxDelayMs)) { | 1134 base::TimeDelta::FromMilliseconds(kStartupSoundMaxDelayMs)) { |
| 1135 EnableSystemSoundsForAccessibility(); | 1135 EnableSystemSoundsForAccessibility(); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1293 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
| 1294 new locale_util::SwitchLanguageCallback( | 1294 new locale_util::SwitchLanguageCallback( |
| 1295 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1295 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
| 1296 | 1296 |
| 1297 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1297 // Load locale keyboards here. Hardware layout would be automatically enabled. |
| 1298 locale_util::SwitchLanguage( | 1298 locale_util::SwitchLanguage( |
| 1299 locale, true, true /* login_layouts_only */, callback.Pass()); | 1299 locale, true, true /* login_layouts_only */, callback.Pass()); |
| 1300 } | 1300 } |
| 1301 | 1301 |
| 1302 } // namespace chromeos | 1302 } // namespace chromeos |
| OLD | NEW |