Index: ui/views/controls/prefix_selector.cc |
diff --git a/ui/views/controls/prefix_selector.cc b/ui/views/controls/prefix_selector.cc |
index f7e8f66fa833828cf983972e85d568a92445b2f4..be574d0f013783fda475a2c0bc82f02a3f3092f1 100644 |
--- a/ui/views/controls/prefix_selector.cc |
+++ b/ui/views/controls/prefix_selector.cc |
@@ -5,6 +5,7 @@ |
#include "ui/views/controls/prefix_selector.h" |
#include "base/i18n/case_conversion.h" |
+#include "ui/base/ime/input_method.h" |
#include "ui/base/ime/text_input_type.h" |
#include "ui/gfx/range/range.h" |
#include "ui/views/controls/prefix_delegate.h" |
@@ -31,6 +32,9 @@ PrefixSelector::PrefixSelector(PrefixDelegate* delegate) |
} |
PrefixSelector::~PrefixSelector() { |
+ ui::InputMethod* input_method = prefix_delegate_->GetInputMethod(); |
+ if (input_method) |
+ input_method->DetachTextInputClient(this); |
} |
void PrefixSelector::OnViewBlur() { |
@@ -55,10 +59,6 @@ void PrefixSelector::InsertChar(base::char16 ch, int flags) { |
OnTextInput(base::string16(1, ch)); |
} |
-gfx::NativeWindow PrefixSelector::GetAttachedWindow() const { |
- return prefix_delegate_->GetWidget()->GetNativeWindow(); |
-} |
- |
ui::TextInputType PrefixSelector::GetTextInputType() const { |
return ui::TEXT_INPUT_TYPE_TEXT; |
} |