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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 7004029: Fix to make InputMethodIBus usable on every ChromeOS device (even without TouchUI) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small fix to replace "if" with "?" Created 9 years, 7 months 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
« no previous file with comments | « views/views.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_gtk.cc
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index a838b64b4130d7abb08410e8119a408f171fd67e..c6edfd918d3e408d740227493431287d6c9510c6 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());
« no previous file with comments | « views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698