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

Unified Diff: ui/base/ime/input_method_ibus.h

Issue 10834175: Remove PendingCreateICRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 8 years, 4 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
« no previous file with comments | « no previous file | ui/base/ime/input_method_ibus.cc » ('j') | ui/base/ime/input_method_ibus.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | ui/base/ime/input_method_ibus.cc » ('j') | ui/base/ime/input_method_ibus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698