summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 02:36:05 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-24 02:36:05 +0000
commit452da69e427d9c9fe87b4e2ce37f1c5276db1922 (patch)
tree5cdf61851b5630cb11a70583c1a61e7b84f76e64 /views/widget
parentf8fa8fb9362151cfce0c55a61f26c55c640925de (diff)
downloadchromium_src-452da69e427d9c9fe87b4e2ce37f1c5276db1922.zip
chromium_src-452da69e427d9c9fe87b4e2ce37f1c5276db1922.tar.gz
chromium_src-452da69e427d9c9fe87b4e2ce37f1c5276db1922.tar.bz2
Fix to make InputMethodIBus usable on every ChromeOS device (even without TouchUI)
Add switch "--enable-inputmethod-ibus" to enable InputMethodIBus on ChromeOS Modify gyp files to link IBus BUG=chromium-os:15566 TEST=manually Review URL: http://codereview.chromium.org/7004029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86390 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/native_widget_gtk.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index a838b64..c6edfd9 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -44,9 +44,10 @@
#endif
#endif
-#if defined(TOUCH_UI) && defined(HAVE_IBUS)
+#if defined(HAVE_IBUS)
#include "views/ime/input_method_ibus.h"
-#else
+#endif
+#if !defined(TOUCH_UI)
#include "views/ime/input_method_gtk.h"
#endif
@@ -619,11 +620,14 @@ void NativeWidgetGtk::InitNativeWidget(const Widget::InitParams& params) {
// already created at this point.
// TODO(suzhe): Always enable input method when we start to use
// RenderWidgetHostViewViews in normal ChromeOS.
-#if defined(TOUCH_UI) && defined(HAVE_IBUS)
- if (!child_) {
+ if (!child_ && NativeTextfieldViews::IsTextfieldViewsEnabled()) {
+#if defined(TOUCH_UI)
input_method_.reset(new InputMethodIBus(this));
+#elif defined(HAVE_IBUS)
+ input_method_.reset(InputMethodIBus::IsInputMethodIBusEnabled() ?
+ static_cast<InputMethod*>(new InputMethodIBus(this)) :
+ static_cast<InputMethod*>(new InputMethodGtk(this)));
#else
- if (!child_ && NativeTextfieldViews::IsTextfieldViewsEnabled()) {
input_method_.reset(new InputMethodGtk(this));
#endif
input_method_->Init(GetWidget());