Index: views/widget/native_widget_views.cc |
diff --git a/views/widget/native_widget_views.cc b/views/widget/native_widget_views.cc |
index c029b2f922108e976cd03e29bc06c6e71ef59177..eb7047f3a524235511c2becbb1e76644adf930dc 100644 |
--- a/views/widget/native_widget_views.cc |
+++ b/views/widget/native_widget_views.cc |
@@ -67,15 +67,13 @@ void NativeWidgetViews::OnActivate(bool active) { |
// This will be fixed when we have WM API. |
Widget* widget = GetWidget(); |
if (widget->is_top_level()) { |
- InputMethod* input_method = widget->GetInputMethodDirect(); |
+ InputMethod* input_method = widget->GetInputMethod(); |
if (active) { |
- if (input_method) |
- input_method->OnFocus(); |
+ input_method->OnFocus(); |
// See description of got_initial_focus_in_ for details on this. |
widget->GetFocusManager()->RestoreFocusedView(); |
} else { |
- if (input_method) |
- input_method->OnBlur(); |
+ input_method->OnBlur(); |
widget->GetFocusManager()->StoreFocusedView(); |
} |
} |