| 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_x11.h" | 5 #include "ui/base/ime/chromeos/ime_keyboard_x11.h" |
| 6 |
| 7 #include <X11/XKBlib.h> |
| 8 #include <X11/Xlib.h> |
| 9 |
| 10 #include "ui/gfx/x/x11_types.h" |
| 6 | 11 |
| 7 namespace chromeos { | 12 namespace chromeos { |
| 8 namespace input_method { | 13 namespace input_method { |
| 9 namespace { | 14 namespace { |
| 10 | 15 |
| 11 // The delay in milliseconds that we'll wait between checking if | 16 // The delay in milliseconds that we'll wait between checking if |
| 12 // setxkbmap command finished. | 17 // setxkbmap command finished. |
| 13 const int kSetLayoutCommandCheckDelayMs = 100; | 18 const int kSetLayoutCommandCheckDelayMs = 100; |
| 14 | 19 |
| 15 // The command we use to set the current XKB layout and modifier key mapping. | 20 // The command we use to set the current XKB layout and modifier key mapping. |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 &(out_rate->initial_delay_in_ms), | 291 &(out_rate->initial_delay_in_ms), |
| 287 &(out_rate->repeat_interval_in_ms)) == True; | 292 &(out_rate->repeat_interval_in_ms)) == True; |
| 288 } | 293 } |
| 289 | 294 |
| 290 // static | 295 // static |
| 291 bool ImeKeyboard::CheckLayoutNameForTesting(const std::string& layout_name) { | 296 bool ImeKeyboard::CheckLayoutNameForTesting(const std::string& layout_name) { |
| 292 return CheckLayoutName(layout_name); | 297 return CheckLayoutName(layout_name); |
| 293 } | 298 } |
| 294 | 299 |
| 295 // static | 300 // static |
| 296 ImeKeyboard* ImeKeyboard::Create() { return new ImeKeyboardX11(); } | 301 ImeKeyboard* ImeKeyboard::Create() { |
| 302 return new ImeKeyboardX11(); |
| 303 } |
| 297 | 304 |
| 298 } // namespace input_method | 305 } // namespace input_method |
| 299 } // namespace chromeos | 306 } // namespace chromeos |
| OLD | NEW |