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

Unified Diff: ui/views/controls/prefix_selector.cc

Issue 1177503003: Remove the 2-level input method system & InputMethodBridge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698