| Index: ui/views/ime/input_method_base.cc
|
| diff --git a/ui/views/ime/input_method_base.cc b/ui/views/ime/input_method_base.cc
|
| index aa9e4d77c36b1629bc991041590a2eaf95042f38..4c4298b7694176ad110b38ad56143bd103e59baa 100644
|
| --- a/ui/views/ime/input_method_base.cc
|
| +++ b/ui/views/ime/input_method_base.cc
|
| @@ -29,10 +29,10 @@ void InputMethodBase::Init(Widget* widget) {
|
| DCHECK(!widget_) << "The input method is already initialized.";
|
|
|
| widget_ = widget;
|
| - if (IsWidgetActive()) {
|
| - // Alert the InputMethod of the Widget's currently focused view.
|
| - OnFocus();
|
| - }
|
| + // Alert the InputMethod of the Widget's currently focused view.
|
| + View* focused = widget->GetFocusManager()->GetFocusedView();
|
| + if (focused)
|
| + OnWillChangeFocus(NULL, focused);
|
| widget->GetFocusManager()->AddFocusChangeListener(this);
|
| }
|
|
|
| @@ -60,12 +60,8 @@ void InputMethodBase::OnWillChangeFocus(View* focused_before, View* focused) {}
|
|
|
| void InputMethodBase::OnDidChangeFocus(View* focused_before, View* focused) {}
|
|
|
| -bool InputMethodBase::IsWidgetActive() const {
|
| - return widget_ ? widget_->IsActive() : false;
|
| -}
|
| -
|
| bool InputMethodBase::IsViewFocused(View* view) const {
|
| - return IsWidgetActive() && view && GetFocusedView() == view;
|
| + return widget_ && widget_->IsActive() && view && GetFocusedView() == view;
|
| }
|
|
|
| bool InputMethodBase::IsTextInputTypeNone() const {
|
|
|