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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 } | 1013 } |
1014 | 1014 |
1015 void LoginDisplayHostImpl::ShowWebUI() { | 1015 void LoginDisplayHostImpl::ShowWebUI() { |
1016 if (!login_window_ || !login_view_) { | 1016 if (!login_window_ || !login_view_) { |
1017 NOTREACHED(); | 1017 NOTREACHED(); |
1018 return; | 1018 return; |
1019 } | 1019 } |
1020 LOG(WARNING) << "Login WebUI >> Show already initialized UI"; | 1020 LOG(WARNING) << "Login WebUI >> Show already initialized UI"; |
1021 login_window_->Show(); | 1021 login_window_->Show(); |
1022 login_view_->GetWebContents()->Focus(); | 1022 login_view_->GetWebContents()->Focus(); |
| 1023 login_view_->RequestFocus(); |
1023 login_view_->SetStatusAreaVisible(status_area_saved_visibility_); | 1024 login_view_->SetStatusAreaVisible(status_area_saved_visibility_); |
1024 login_view_->OnPostponedShow(); | 1025 login_view_->OnPostponedShow(); |
1025 | 1026 |
1026 // Login window could be shown after the spring charger dialog shows, and | 1027 // Login window could be shown after the spring charger dialog shows, and |
1027 // take away the focus from it. Set the focus back to the charger dialog | 1028 // take away the focus from it. Set the focus back to the charger dialog |
1028 // if it is visible. | 1029 // if it is visible. |
1029 // See crbug.com/328538. | 1030 // See crbug.com/328538. |
1030 ChargerReplacementDialog::SetFocusOnChargerDialogIfVisible(); | 1031 ChargerReplacementDialog::SetFocusOnChargerDialogIfVisible(); |
1031 | 1032 |
1032 // We should reset this flag to allow changing of status area visibility. | 1033 // We should reset this flag to allow changing of status area visibility. |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 scoped_ptr<locale_util::SwitchLanguageCallback> callback( | 1303 scoped_ptr<locale_util::SwitchLanguageCallback> callback( |
1303 new locale_util::SwitchLanguageCallback( | 1304 new locale_util::SwitchLanguageCallback( |
1304 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); | 1305 base::Bind(&OnLanguageSwitchedCallback, base::Passed(data.Pass())))); |
1305 | 1306 |
1306 // Load locale keyboards here. Hardware layout would be automatically enabled. | 1307 // Load locale keyboards here. Hardware layout would be automatically enabled. |
1307 locale_util::SwitchLanguage( | 1308 locale_util::SwitchLanguage( |
1308 locale, true, true /* login_layouts_only */, callback.Pass()); | 1309 locale, true, true /* login_layouts_only */, callback.Pass()); |
1309 } | 1310 } |
1310 | 1311 |
1311 } // namespace chromeos | 1312 } // namespace chromeos |
OLD | NEW |