Chromium Code Reviews| Index: chrome/browser/chromeos/input_method/ibus_ui_controller.cc |
| diff --git a/chrome/browser/chromeos/input_method/ibus_ui_controller.cc b/chrome/browser/chromeos/input_method/ibus_ui_controller.cc |
| index a7b9b763b856400e373088bca8c362823682d81c..50fb054d98915f3971908a7a5345d086d147f864 100644 |
| --- a/chrome/browser/chromeos/input_method/ibus_ui_controller.cc |
| +++ b/chrome/browser/chromeos/input_method/ibus_ui_controller.cc |
| @@ -298,28 +298,14 @@ class IBusUiControllerImpl : public IBusUiController { |
| int32 x, |
|
Yusuke Sato
2012/06/13 14:31:26
line 298-301: const gfx::Rect&
Seigo Nonaka
2012/06/13 15:07:18
Done.
|
| int32 y, |
| int32 w, |
| - int32 h) OVERRIDE { |
| - // The list of input method IDs for Mozc Japanese IMEs. |
|
Yusuke Sato
2012/06/13 14:31:26
super-nice :)
I'm very happy to see the hack will
|
| - const char* kMozcJaInputMethodIds[] = { "mozc", "mozc-jp", "mozc-dv" }; |
| - |
| + int32 h, |
| + const gfx::Rect& composition_head) OVERRIDE { |
| if (!ui_) |
| return; |
| - |
| - scoped_ptr<InputMethodDescriptors> input_methods( |
| - InputMethodManager::GetInstance()->GetSupportedInputMethods()); |
| - for (size_t i = 0; i < arraysize(kMozcJaInputMethodIds); ++i) { |
| - if (IsActive(kMozcJaInputMethodIds[i], input_methods.get())) { |
| - // Mozc Japanese IMEs require cursor location information to show the |
| - // suggestion window in a correct position. |
| - ui::internal::IBusClientImpl::SetCursorLocation(context, x, y, w, h); |
| - break; // call IBusUiControllerImpl::SetCursorLocation() as well. |
| - } |
| - } |
| - |
| // We don't have to call ibus_input_context_set_cursor_location() on |
| // Chrome OS because the candidate window for IBus is integrated with |
| // Chrome. |
| - ui_->SetCursorLocation(NULL, x, y, w, h); |
| + ui_->SetCursorLocation(NULL, x, y, w, h, composition_head); |
| } |
| void set_ui(IBusUiControllerImpl* ui) { |
| @@ -383,7 +369,7 @@ class IBusUiControllerImpl : public IBusUiController { |
| gint x, gint y, gint width, gint height, |
| gpointer userdata) { |
| return reinterpret_cast<IBusUiControllerImpl*>(userdata) |
| - ->SetCursorLocation(sender, x, y, width, height); |
| + ->SetCursorLocation(sender, x, y, width, height, gfx::Rect()); |
| } |
| static void UpdateLookupTableThunk(IBusPanelService* sender, |
| IBusLookupTable* table, gboolean visible, |
| @@ -570,10 +556,12 @@ class IBusUiControllerImpl : public IBusUiController { |
| gint x, |
| gint y, |
| gint width, |
| - gint height) { |
| + gint height, |
| + const gfx::Rect& composition_head) { |
| // Note: |panel| might be NULL. See IBusChromeOSClientImpl above. |
| FOR_EACH_OBSERVER(Observer, observers_, |
| - OnSetCursorLocation(x, y, width, height)); |
| + OnSetCursorLocation(x, y, width, height, |
| + composition_head)); |
| } |
| // Handles IBusPanelService's |UpdatePreeditText| method call. |