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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 23245012: Fix Views Combobox and Tree View text input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nit. Created 7 years, 4 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 5348f24b20bf077066f6cdaffd3bd32a9f8df566..82cd79a3bb60b1400d3d84bdd2c4546c1c70451b 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -888,23 +888,10 @@ void NativeWidgetAura::OnWindowFocused(aura::Window* gained_focus,
if (window_ == gained_focus) {
// In aura, it is possible for child native widgets to take input and focus,
// this differs from the behavior on windows.
- if (GetWidget()->GetInputMethod()) // Null in tests.
- GetWidget()->GetInputMethod()->OnFocus();
delegate_->OnNativeFocus(lost_focus);
} else if (window_ == lost_focus) {
- // GetInputMethod() recreates the input method if it's previously been
- // destroyed. If we get called during destruction, the input method will be
- // gone, and creating a new one and telling it that we lost the focus will
- // trigger a DCHECK (the new input method doesn't think that we have the
- // focus and doesn't expect a blur). OnBlur() shouldn't be called during
- // destruction unless WIDGET_OWNS_NATIVE_WIDGET is set (which is just the
- // case in tests).
- if (!destroying_) {
- if (GetWidget()->GetInputMethod())
- GetWidget()->GetInputMethod()->OnBlur();
- } else {
+ if (destroying_)
DCHECK_EQ(ownership_, Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET);
- }
aura::client::FocusClient* client = aura::client::GetFocusClient(window_);
if (client) // NULL during destruction of aura::Window.
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc ('k') | ui/views/widget/native_widget_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698