| Index: ui/base/ime/input_method_ibus.h
|
| diff --git a/ui/base/ime/input_method_ibus.h b/ui/base/ime/input_method_ibus.h
|
| index 69e280f119f2cfb4eb85418af125746622d38842..396d82dc6090d240b95eb2ba6af45f9ced38daa2 100644
|
| --- a/ui/base/ime/input_method_ibus.h
|
| +++ b/ui/base/ime/input_method_ibus.h
|
| @@ -67,8 +67,16 @@ class UI_EXPORT InputMethodIBus : public InputMethodBase {
|
| CompositionText* out_composition) const;
|
|
|
| private:
|
| + enum InputContextState {
|
| + // The input context is not working.
|
| + INPUT_CONTEXT_STOP,
|
| + // The input context is waiting for CreateInputContext reply from
|
| + // ibus-daemon.
|
| + INPUT_CONTEXT_WAIT_CREATE_INPUT_CONTEXT_RESPONSE,
|
| + // The input context is working and ready to communicate with ibus-daemon.
|
| + INPUT_CONTEXT_RUNNING,
|
| + };
|
| class PendingKeyEvent;
|
| - class PendingCreateICRequest;
|
|
|
| // Overridden from InputMethodBase:
|
| virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
|
| @@ -160,9 +168,8 @@ class UI_EXPORT InputMethodIBus : public InputMethodBase {
|
| bool visible);
|
| void OnHidePreeditText();
|
|
|
| - void CreateInputContextDone(PendingCreateICRequest* ic_request,
|
| - const dbus::ObjectPath& object_path);
|
| - void CreateInputContextFail(PendingCreateICRequest* ic_request);
|
| + void CreateInputContextDone(const dbus::ObjectPath& object_path);
|
| + void CreateInputContextFail();
|
| static void ProcessKeyEventDone(PendingKeyEvent* pending_key_event,
|
| bool is_handled);
|
| static void ProcessKeyEventFail(PendingKeyEvent* pending_key_event);
|
| @@ -174,9 +181,11 @@ class UI_EXPORT InputMethodIBus : public InputMethodBase {
|
| // They will be deleted in ProcessKeyEventDone().
|
| std::set<PendingKeyEvent*> pending_key_events_;
|
|
|
| - // The pending request for creating the input context. We need to keep this
|
| - // pointer so that we can receive or abandon the result.
|
| - PendingCreateICRequest* pending_create_ic_request_;
|
| + // Represents input context's state.
|
| + InputContextState input_context_state_;
|
| +
|
| + // The count of CreateInputContext message failure.
|
| + int create_input_context_fail_count_;
|
|
|
| // Pending composition text generated by the current pending key event.
|
| // It'll be sent to the focused text input client as soon as we receive the
|
|
|