Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: ui/chromeos/ime/ime_keyboard_x11.cc

Issue 727143002: Moves code from chromeos/ime to ui/base/ime/chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698