OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 std::vector<std::string> allowed_input_methods; | 241 std::vector<std::string> allowed_input_methods; |
242 | 242 |
243 // Add user's input method first so it is pre-selected. | 243 // Add user's input method first so it is pre-selected. |
244 if (!user_input_method.empty()) { | 244 if (!user_input_method.empty()) { |
245 allowed_input_methods.push_back(user_input_method); | 245 allowed_input_methods.push_back(user_input_method); |
246 } | 246 } |
247 | 247 |
248 std::string input_method; | 248 std::string input_method; |
249 for (const auto& input_method_entry : *login_screen_input_methods) { | 249 for (const auto& input_method_entry : *login_screen_input_methods) { |
250 if (input_method_entry.GetAsString(&input_method)) | 250 if (input_method_entry->GetAsString(&input_method)) |
251 allowed_input_methods.push_back(input_method); | 251 allowed_input_methods.push_back(input_method); |
252 } | 252 } |
253 chromeos::input_method::InputMethodManager* imm = | 253 chromeos::input_method::InputMethodManager* imm = |
254 chromeos::input_method::InputMethodManager::Get(); | 254 chromeos::input_method::InputMethodManager::Get(); |
255 imm->GetActiveIMEState()->SetAllowedInputMethods(allowed_input_methods); | 255 imm->GetActiveIMEState()->SetAllowedInputMethods(allowed_input_methods); |
256 } | 256 } |
257 | 257 |
258 void StopEnforcingPolicyInputMethods() { | 258 void StopEnforcingPolicyInputMethods() { |
259 // Empty means all input methods are allowed | 259 // Empty means all input methods are allowed |
260 std::vector<std::string> allowed_input_methods; | 260 std::vector<std::string> allowed_input_methods; |
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 rate.initial_delay_in_ms = auto_repeat_delay; | 1655 rate.initial_delay_in_ms = auto_repeat_delay; |
1656 rate.repeat_interval_in_ms = auto_repeat_interval; | 1656 rate.repeat_interval_in_ms = auto_repeat_interval; |
1657 input_method::InputMethodManager::Get() | 1657 input_method::InputMethodManager::Get() |
1658 ->GetImeKeyboard() | 1658 ->GetImeKeyboard() |
1659 ->SetAutoRepeatEnabled(true); | 1659 ->SetAutoRepeatEnabled(true); |
1660 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( | 1660 input_method::InputMethodManager::Get()->GetImeKeyboard()->SetAutoRepeatRate( |
1661 rate); | 1661 rate); |
1662 } | 1662 } |
1663 | 1663 |
1664 } // namespace chromeos | 1664 } // namespace chromeos |
OLD | NEW |