diff options
author | penghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 02:53:19 +0000 |
---|---|---|
committer | penghuang@chromium.org <penghuang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-18 02:53:19 +0000 |
commit | 34c2cebd14a476d76e91b92724ce4455095bb990 (patch) | |
tree | ef2db9a2e6f4724de52f870e03c1583cddbb0fda | |
parent | f0d7241e01c9b8aa8328c2358c6239534832dadb (diff) | |
download | chromium_src-34c2cebd14a476d76e91b92724ce4455095bb990.zip chromium_src-34c2cebd14a476d76e91b92724ce4455095bb990.tar.gz chromium_src-34c2cebd14a476d76e91b92724ce4455095bb990.tar.bz2 |
Do not handle Enable and Disable signals of IBusInputContext.
Becasue Enable and Disable are for indicating if an IBusInputContext
is associated with an input method engine and the engine is active.
So InputMethodIBus should not use them to decide if the input method
system is enabled or not.
BUG=None
TEST=Manually
Review URL: http://codereview.chromium.org/6975013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85718 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | views/ime/input_method_ibus.cc | 23 | ||||
-rw-r--r-- | views/ime/input_method_ibus.h | 5 |
2 files changed, 1 insertions, 27 deletions
diff --git a/views/ime/input_method_ibus.cc b/views/ime/input_method_ibus.cc index 19032ef..a20e05a 100644 --- a/views/ime/input_method_ibus.cc +++ b/views/ime/input_method_ibus.cc @@ -260,8 +260,7 @@ InputMethodIBus::InputMethodIBus(internal::InputMethodDelegate* delegate) context_focused_(false), composing_text_(false), composition_changed_(false), - suppress_next_result_(false), - enabled_(false) { + suppress_next_result_(false) { set_delegate(delegate); } @@ -478,10 +477,6 @@ void InputMethodIBus::SetContext(IBusInputContext* ic, bool fake) { G_CALLBACK(OnShowPreeditTextThunk), this); g_signal_connect(ic, "hide-preedit-text", G_CALLBACK(OnHidePreeditTextThunk), this); - g_signal_connect(ic, "enabled", - G_CALLBACK(OnEnableThunk), this); - g_signal_connect(ic, "disabled", - G_CALLBACK(OnDisableThunk), this); g_signal_connect(ic, "destroy", G_CALLBACK(OnDestroyThunk), this); @@ -489,9 +484,6 @@ void InputMethodIBus::SetContext(IBusInputContext* ic, bool fake) { guint32 caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS; ibus_input_context_set_capabilities(ic, caps); - // Sadly, we will not receive "enabled" signal at all. So just assume the - // input context is enabled by default. - enabled_ = true; UpdateContextFocusState(); OnInputMethodChanged(); } @@ -900,18 +892,6 @@ void InputMethodIBus::OnHidePreeditText(IBusInputContext* context) { } } -void InputMethodIBus::OnEnable(IBusInputContext* context) { - DCHECK_EQ(context_, context); - enabled_ = true; - OnInputMethodChanged(); -} - -void InputMethodIBus::OnDisable(IBusInputContext* context) { - DCHECK_EQ(context_, context); - enabled_ = false; - OnInputMethodChanged(); -} - void InputMethodIBus::OnDestroy(IBusInputContext* context) { DCHECK_EQ(context_, context); g_object_unref(context_); @@ -923,7 +903,6 @@ void InputMethodIBus::OnDestroy(IBusInputContext* context) { // We are dead, so we need to ask the client to stop relying on us. // We cannot do it in DestroyContext(), because OnDestroy() may be called // automatically. - enabled_ = false; OnInputMethodChanged(); } diff --git a/views/ime/input_method_ibus.h b/views/ime/input_method_ibus.h index ac1dcbb..1e1a2034 100644 --- a/views/ime/input_method_ibus.h +++ b/views/ime/input_method_ibus.h @@ -128,8 +128,6 @@ class InputMethodIBus : public InputMethodBase { IBusInputContext*, IBusText*, guint, gboolean); CHROMEG_CALLBACK_0(InputMethodIBus, void, OnHidePreeditText, IBusInputContext*); - CHROMEG_CALLBACK_0(InputMethodIBus, void, OnEnable, IBusInputContext*); - CHROMEG_CALLBACK_0(InputMethodIBus, void, OnDisable, IBusInputContext*); CHROMEG_CALLBACK_0(InputMethodIBus, void, OnDestroy, IBusInputContext*); CHROMEG_CALLBACK_0(InputMethodIBus, void, OnFakeDestroy, IBusInputContext*); @@ -193,9 +191,6 @@ class InputMethodIBus : public InputMethodBase { // event will be discarded. bool suppress_next_result_; - // Indicates if |context_| is enabled. - bool enabled_; - DISALLOW_COPY_AND_ASSIGN(InputMethodIBus); }; |