| OLD | NEW |
| 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/language_switch_menu.h" | 5 #include "chrome/browser/chromeos/login/language_switch_menu.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
| 9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 //////////////////////////////////////////////////////////////////////////////// | 192 //////////////////////////////////////////////////////////////////////////////// |
| 193 // views::MenuDelegate implementation. | 193 // views::MenuDelegate implementation. |
| 194 | 194 |
| 195 void LanguageSwitchMenu::ExecuteCommand(int command_id) { | 195 void LanguageSwitchMenu::ExecuteCommand(int command_id) { |
| 196 const std::string locale = language_list_->GetLocaleFromIndex(command_id); | 196 const std::string locale = language_list_->GetLocaleFromIndex(command_id); |
| 197 // Here, we should enable keyboard layouts associated with the locale so | 197 // Here, we should enable keyboard layouts associated with the locale so |
| 198 // that users can use those keyboard layouts on the login screen. | 198 // that users can use those keyboard layouts on the login screen. |
| 199 SwitchLanguageAndEnableKeyboardLayouts(locale); | 199 SwitchLanguageAndEnableKeyboardLayouts(locale); |
| 200 InitLanguageMenu(); | 200 InitLanguageMenu(); |
| 201 NotifyLocaleChanged(ash::Shell::GetRootWindow()); | 201 NotifyLocaleChanged(ash::Shell::GetPrimaryRootWindow()); |
| 202 } | 202 } |
| 203 | 203 |
| 204 } // namespace chromeos | 204 } // namespace chromeos |
| OLD | NEW |