| 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 <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/common/system/tray/system_tray.h" | 10 #include "ash/common/system/tray/system_tray.h" |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 //////////////////////////////////////////////////////////////////////////////// | 1021 //////////////////////////////////////////////////////////////////////////////// |
| 1022 // LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver: | 1022 // LoginDisplayHostImpl, chromeos::CrasAudioHandler::AudioObserver: |
| 1023 | 1023 |
| 1024 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { | 1024 void LoginDisplayHostImpl::OnActiveOutputNodeChanged() { |
| 1025 TryToPlayStartupSound(); | 1025 TryToPlayStartupSound(); |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 //////////////////////////////////////////////////////////////////////////////// | 1028 //////////////////////////////////////////////////////////////////////////////// |
| 1029 // LoginDisplayHostImpl, ash::ShellObserver: | 1029 // LoginDisplayHostImpl, ash::ShellObserver: |
| 1030 | 1030 |
| 1031 void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged(bool activated) { | 1031 void LoginDisplayHostImpl::OnVirtualKeyboardStateChanged( |
| 1032 bool activated, |
| 1033 ash::WmWindow* root_window) { |
| 1032 if (keyboard::KeyboardController::GetInstance()) { | 1034 if (keyboard::KeyboardController::GetInstance()) { |
| 1033 if (activated) { | 1035 if (activated) { |
| 1034 if (!is_observing_keyboard_) { | 1036 if (!is_observing_keyboard_) { |
| 1035 keyboard::KeyboardController::GetInstance()->AddObserver(this); | 1037 keyboard::KeyboardController::GetInstance()->AddObserver(this); |
| 1036 is_observing_keyboard_ = true; | 1038 is_observing_keyboard_ = true; |
| 1037 } | 1039 } |
| 1038 } else { | 1040 } else { |
| 1039 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); | 1041 keyboard::KeyboardController::GetInstance()->RemoveObserver(this); |
| 1040 is_observing_keyboard_ = false; | 1042 is_observing_keyboard_ = false; |
| 1041 } | 1043 } |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1488 // Chrome locale. Otherwise it will be lost if Chrome restarts. | 1490 // Chrome locale. Otherwise it will be lost if Chrome restarts. |
| 1489 // Don't need to schedule pref save because setting initial local | 1491 // Don't need to schedule pref save because setting initial local |
| 1490 // will enforce preference saving. | 1492 // will enforce preference saving. |
| 1491 prefs->SetString(prefs::kApplicationLocale, locale); | 1493 prefs->SetString(prefs::kApplicationLocale, locale); |
| 1492 StartupUtils::SetInitialLocale(locale); | 1494 StartupUtils::SetInitialLocale(locale); |
| 1493 | 1495 |
| 1494 TriggerShowLoginWizardFinish(locale, std::move(data)); | 1496 TriggerShowLoginWizardFinish(locale, std::move(data)); |
| 1495 } | 1497 } |
| 1496 | 1498 |
| 1497 } // namespace chromeos | 1499 } // namespace chromeos |
| OLD | NEW |