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

Side by Side Diff: ui/views/controls/native/native_view_host.cc

Issue 588113002: Change Widget::GetAllOwnedWidgets to return child widgets as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aid_resilient_to_uninstall_and_profile_changes
Patch Set: Merged GetAllChildWidgets and GetAllOwnedWidgets Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_win.cc ('k') | ui/views/controls/native/native_view_host_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698