Chromium Code Reviews| Index: views/widget/native_widget_gtk.cc |
| diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc |
| index ba3364c3c64b806cd4e97cc1f4844c23a8d57013..f4cb6a74110be89e512dec6816b420f12096510a 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,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)); |
| + } |
|
oshima
2011/05/22 01:18:56
} else {
|
| + else { |
| + input_method_.reset(new InputMethodGtk(this)); |
|
oshima
2011/05/22 01:18:56
won't this causes link error in touch build? (sinc
|
| + } |
| +#else |
| input_method_.reset(new InputMethodGtk(this)); |
| #endif |
| input_method_->Init(GetWidget()); |