OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/views/controls/native/native_view_host.h" | 5 #include "ui/views/controls/native/native_view_host.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/base/cursor/cursor.h" | 8 #include "ui/base/cursor/cursor.h" |
9 #include "ui/gfx/canvas.h" | 9 #include "ui/gfx/canvas.h" |
10 #include "ui/views/accessibility/native_view_accessibility.h" | 10 #include "ui/views/accessibility/native_view_accessibility.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 native_view_ = NULL; | 205 native_view_ = NULL; |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 void NativeViewHost::ClearFocus() { | 209 void NativeViewHost::ClearFocus() { |
210 FocusManager* focus_manager = GetFocusManager(); | 210 FocusManager* focus_manager = GetFocusManager(); |
211 if (!focus_manager || !focus_manager->GetFocusedView()) | 211 if (!focus_manager || !focus_manager->GetFocusedView()) |
212 return; | 212 return; |
213 | 213 |
214 Widget::Widgets widgets; | 214 Widget::Widgets widgets; |
215 Widget::GetAllChildWidgets(native_view(), &widgets); | 215 Widget::GetAllChildAndOwnedWidgets(native_view(), &widgets); |
sky
2014/10/23 02:29:18
GAH! Sorry, didn't realize these other windows don
| |
216 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { | 216 for (Widget::Widgets::iterator i = widgets.begin(); i != widgets.end(); ++i) { |
217 focus_manager->ViewRemoved((*i)->GetRootView()); | 217 focus_manager->ViewRemoved((*i)->GetRootView()); |
218 if (!focus_manager->GetFocusedView()) | 218 if (!focus_manager->GetFocusedView()) |
219 return; | 219 return; |
220 } | 220 } |
221 } | 221 } |
222 | 222 |
223 } // namespace views | 223 } // namespace views |
OLD | NEW |