summaryrefslogtreecommitdiffstats
path: root/views/controls/native
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 04:02:15 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-12 04:02:15 +0000
commitaab6916887fca00a37ea6b2c3644398337cdbd3a (patch)
tree4c2ebd2c05742f19ac94ab53c6478e727fb59f8d /views/controls/native
parentb40df40ee49eb79124ccb020f3b0d12d607ed17a (diff)
downloadchromium_src-aab6916887fca00a37ea6b2c3644398337cdbd3a.zip
chromium_src-aab6916887fca00a37ea6b2c3644398337cdbd3a.tar.gz
chromium_src-aab6916887fca00a37ea6b2c3644398337cdbd3a.tar.bz2
Avoid dangling references to Views from FocusManager.
When handling a native view hierarchy change, make sure any Views that are going to become disassociated from the FocusManager are removed from focus. BUG=75172 TEST=none Review URL: http://codereview.chromium.org/6670010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77918 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/native')
-rw-r--r--views/controls/native/native_view_host_win.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/views/controls/native/native_view_host_win.cc b/views/controls/native/native_view_host_win.cc
index dbb8461..f8bda8e 100644
--- a/views/controls/native/native_view_host_win.cc
+++ b/views/controls/native/native_view_host_win.cc
@@ -43,7 +43,7 @@ void NativeViewHostWin::NativeViewAttached() {
NativeWidget::GetAllNativeWidgets(host_->native_view(), &widgets);
for (NativeWidget::NativeWidgets::iterator it = widgets.begin();
it != widgets.end(); ++it) {
- (*it)->GetWidget()->GetRootView()->NotifyNativeViewHierarchyChanged(
+ (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(
true,
host_->GetWidget()->GetNativeView());
}
@@ -58,7 +58,7 @@ void NativeViewHostWin::NativeViewDetaching(bool destroyed) {
NativeWidget::GetAllNativeWidgets(host_->native_view(), &widgets);
for (NativeWidget::NativeWidgets::iterator it = widgets.begin();
it != widgets.end(); ++it) {
- (*it)->GetWidget()->GetRootView()->NotifyNativeViewHierarchyChanged(
+ (*it)->GetWidget()->NotifyNativeViewHierarchyChanged(
false,
host_->GetWidget()->GetNativeView());
}