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 "chromeos/ime/ime_keyboard.h" | 5 #include "chromeos/ime/ime_keyboard.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <queue> | 9 #include <queue> |
10 #include <set> | 10 #include <set> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // Some code seems to assume that Mod2Mask is always assigned to | 187 // Some code seems to assume that Mod2Mask is always assigned to |
188 // Num Lock. | 188 // Num Lock. |
189 // | 189 // |
190 // TODO(yusukes): Check the assumption is really okay. If not, | 190 // TODO(yusukes): Check the assumption is really okay. If not, |
191 // modify the Aura code, and then remove the CHECK below. | 191 // modify the Aura code, and then remove the CHECK below. |
192 LOG_IF(ERROR, num_lock_mask_ != Mod2Mask) | 192 LOG_IF(ERROR, num_lock_mask_ != Mod2Mask) |
193 << "NumLock is not assigned to Mod2Mask. : " << num_lock_mask_; | 193 << "NumLock is not assigned to Mod2Mask. : " << num_lock_mask_; |
194 } | 194 } |
195 | 195 |
196 current_caps_lock_status_ = CapsLockIsEnabled(); | 196 current_caps_lock_status_ = CapsLockIsEnabled(); |
| 197 // Disable Num Lock on X start up for http://crosbug.com/29169. |
| 198 DisableNumLock(); |
197 } | 199 } |
198 | 200 |
199 void ImeKeyboardX11::AddObserver(Observer* observer) { | 201 void ImeKeyboardX11::AddObserver(Observer* observer) { |
200 observers_.AddObserver(observer); | 202 observers_.AddObserver(observer); |
201 } | 203 } |
202 | 204 |
203 void ImeKeyboardX11::RemoveObserver(Observer* observer) { | 205 void ImeKeyboardX11::RemoveObserver(Observer* observer) { |
204 observers_.RemoveObserver(observer); | 206 observers_.RemoveObserver(observer); |
205 } | 207 } |
206 | 208 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 // static | 454 // static |
453 bool ImeKeyboard::CheckLayoutNameForTesting(const std::string& layout_name) { | 455 bool ImeKeyboard::CheckLayoutNameForTesting(const std::string& layout_name) { |
454 return CheckLayoutName(layout_name); | 456 return CheckLayoutName(layout_name); |
455 } | 457 } |
456 | 458 |
457 // static | 459 // static |
458 ImeKeyboard* ImeKeyboard::Create() { return new ImeKeyboardX11(); } | 460 ImeKeyboard* ImeKeyboard::Create() { return new ImeKeyboardX11(); } |
459 | 461 |
460 } // namespace input_method | 462 } // namespace input_method |
461 } // namespace chromeos | 463 } // namespace chromeos |
OLD | NEW |