| Index: views/ime/input_method_base.cc
|
| diff --git a/views/ime/input_method_base.cc b/views/ime/input_method_base.cc
|
| index a062f6bd2d4840f397df8f0e2549148981809f67..c6e9b19aeb8de8831cc97017f83313feca20c667 100644
|
| --- a/views/ime/input_method_base.cc
|
| +++ b/views/ime/input_method_base.cc
|
| @@ -39,6 +39,9 @@ void InputMethodBase::Init(Widget* widget) {
|
| }
|
|
|
| widget_ = widget;
|
| + View* focused = widget->GetFocusManager()->GetFocusedView();
|
| + if (focused)
|
| + FocusWillChange(NULL, focused);
|
| widget->GetFocusManager()->AddFocusChangeListener(this);
|
| }
|
|
|
| @@ -50,7 +53,14 @@ void InputMethodBase::OnBlur() {
|
| widget_focused_ = false;
|
| }
|
|
|
| +void InputMethodBase::OnTextInputTypeChanged(View* view) {
|
| + if (view == focused_view())
|
| + TextInputTypeChanged(focused_view());
|
| +}
|
| +
|
| TextInputClient* InputMethodBase::GetTextInputClient() const {
|
| + return (focused_view_) ?
|
| + focused_view_->GetTextInputClient() : NULL;
|
| return (widget_focused_ && focused_view_) ?
|
| focused_view_->GetTextInputClient() : NULL;
|
| }
|
| @@ -65,6 +75,7 @@ void InputMethodBase::FocusWillChange(View* focused_before, View* focused) {
|
| FocusedViewWillChange();
|
| focused_view_ = focused;
|
| FocusedViewDidChange();
|
| + TextInputTypeChanged(focused_view());
|
| }
|
|
|
| bool InputMethodBase::IsViewFocused(View* view) const {
|
|
|