Chromium Code Reviews| Index: ui/chromeos/ime/ime_keyboard_x11.cc |
| diff --git a/chromeos/ime/ime_keyboard_x11.cc b/ui/chromeos/ime/ime_keyboard_x11.cc |
| similarity index 94% |
| rename from chromeos/ime/ime_keyboard_x11.cc |
| rename to ui/chromeos/ime/ime_keyboard_x11.cc |
| index 8e1c7955b5b37e2bbdd2cd5a30607dcfd022f00c..5eb21378b6a2ac800d2623a209ac5b7751199877 100644 |
| --- a/chromeos/ime/ime_keyboard_x11.cc |
| +++ b/ui/chromeos/ime/ime_keyboard_x11.cc |
| @@ -2,7 +2,12 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chromeos/ime/ime_keyboard_x11.h" |
| +#include "ui/chromeos/ime/ime_keyboard_x11.h" |
| +#include "ui/gfx/x/x11_types.h" |
| + |
| +// These includes conflict with base/tracked_objects.h so must come last. |
| +#include <X11/XKBlib.h> |
| +#include <X11/Xlib.h> |
| namespace chromeos { |
| namespace input_method { |
| @@ -273,14 +278,15 @@ void ImeKeyboardX11::OnSetLayoutFinish() { |
| } |
| // static |
| -bool ImeKeyboard::GetAutoRepeatEnabledForTesting() { |
| +UI_CHROMEOS_EXPORT bool ImeKeyboard::GetAutoRepeatEnabledForTesting() { |
|
Jun Mukai
2014/11/20 07:34:14
same
Shu Chen
2014/11/20 08:34:38
Done.
|
| XKeyboardState state = {}; |
| XGetKeyboardControl(gfx::GetXDisplay(), &state); |
| return state.global_auto_repeat != AutoRepeatModeOff; |
| } |
| // static |
| -bool ImeKeyboard::GetAutoRepeatRateForTesting(AutoRepeatRate* out_rate) { |
| +UI_CHROMEOS_EXPORT bool ImeKeyboard::GetAutoRepeatRateForTesting( |
| + AutoRepeatRate* out_rate) { |
| return XkbGetAutoRepeatRate(gfx::GetXDisplay(), |
| XkbUseCoreKbd, |
| &(out_rate->initial_delay_in_ms), |
| @@ -288,12 +294,15 @@ bool ImeKeyboard::GetAutoRepeatRateForTesting(AutoRepeatRate* out_rate) { |
| } |
| // static |
| -bool ImeKeyboard::CheckLayoutNameForTesting(const std::string& layout_name) { |
| +UI_CHROMEOS_EXPORT bool ImeKeyboard::CheckLayoutNameForTesting( |
| + const std::string& layout_name) { |
| return CheckLayoutName(layout_name); |
| } |
| // static |
| -ImeKeyboard* ImeKeyboard::Create() { return new ImeKeyboardX11(); } |
| +UI_CHROMEOS_EXPORT ImeKeyboard* ImeKeyboard::Create() { |
| + return new ImeKeyboardX11(); |
| +} |
| } // namespace input_method |
| } // namespace chromeos |