OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/ime/input_method_ibus.h" | 5 #include "views/ime/input_method_ibus.h" |
6 | 6 |
7 #include <ibus.h> | 7 #include <ibus.h> |
8 | 8 |
9 #include <cstring> | 9 #include <cstring> |
10 #include <set> | 10 #include <set> |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 ibus_keyval, ibus_keycode, ibus_state, -1, NULL, | 405 ibus_keyval, ibus_keycode, ibus_state, -1, NULL, |
406 reinterpret_cast<GAsyncReadyCallback>(ProcessKeyEventDone), | 406 reinterpret_cast<GAsyncReadyCallback>(ProcessKeyEventDone), |
407 pending_key); | 407 pending_key); |
408 | 408 |
409 // We don't want to suppress the result generated by this key event, but it | 409 // We don't want to suppress the result generated by this key event, but it |
410 // may cause problem. See comment in ResetContext() method. | 410 // may cause problem. See comment in ResetContext() method. |
411 suppress_next_result_ = false; | 411 suppress_next_result_ = false; |
412 } | 412 } |
413 | 413 |
414 void InputMethodIBus::OnTextInputTypeChanged(View* view) { | 414 void InputMethodIBus::OnTextInputTypeChanged(View* view) { |
| 415 InputMethodBase::OnTextInputTypeChanged(view); |
415 if (context_ && IsViewFocused(view)) { | 416 if (context_ && IsViewFocused(view)) { |
416 ResetContext(); | 417 ResetContext(); |
417 UpdateContextFocusState(); | 418 UpdateContextFocusState(); |
418 } | 419 } |
419 } | 420 } |
420 | 421 |
421 void InputMethodIBus::OnCaretBoundsChanged(View* view) { | 422 void InputMethodIBus::OnCaretBoundsChanged(View* view) { |
422 if (!context_focused_ || !IsViewFocused(view)) | 423 if (!context_focused_ || !IsViewFocused(view)) |
423 return; | 424 return; |
424 | 425 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1003 DCHECK_EQ(GetIBus(), bus); | 1004 DCHECK_EQ(GetIBus(), bus); |
1004 DCHECK(data); | 1005 DCHECK(data); |
1005 IBusInputContext* ic = | 1006 IBusInputContext* ic = |
1006 ibus_bus_create_input_context_async_finish(bus, res, NULL); | 1007 ibus_bus_create_input_context_async_finish(bus, res, NULL); |
1007 if (ic) | 1008 if (ic) |
1008 data->StoreOrAbandonInputContext(ic); | 1009 data->StoreOrAbandonInputContext(ic); |
1009 delete data; | 1010 delete data; |
1010 } | 1011 } |
1011 | 1012 |
1012 } // namespace views | 1013 } // namespace views |
OLD | NEW |