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

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: 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
« views/ime/input_method_ibus.h ('K') | « 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 92ddd11822677a225918347a466b59d02e41bf40..c59f6f132b43561da0cdcdc6d4228a81e6651372 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -45,11 +45,10 @@
#endif
#endif
-#if defined(TOUCH_UI) && defined(HAVE_IBUS)
+#if defined(HAVE_IBUS)
oshima 2011/05/20 21:47:31 this change adds gtk impl to touch. could you plea
#include "views/ime/input_method_ibus.h"
-#else
-#include "views/ime/input_method_gtk.h"
#endif
+#include "views/ime/input_method_gtk.h"
using ui::OSExchangeData;
using ui::OSExchangeDataProviderGtk;
@@ -620,11 +619,15 @@ 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_) {
- input_method_.reset(new InputMethodIBus(this));
-#else
if (!child_ && NativeTextfieldViews::IsTextfieldViewsEnabled()) {
+#if defined(HAVE_IBUS)
+ if(InputMethodIBus::IsInputMethodIBusEnabled()) {
+ input_method_.reset(new InputMethodIBus(this));
+ }
+ else {
+ input_method_.reset(new InputMethodGtk(this));
+ }
+#else
input_method_.reset(new InputMethodGtk(this));
#endif
input_method_->Init(GetWidget());
« views/ime/input_method_ibus.h ('K') | « views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698