Index: chrome/browser/renderer_host/render_widget_host_view_win.cc |
=================================================================== |
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 72336) |
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy) |
@@ -565,6 +565,12 @@ |
SetParent(parent_hwnd_); |
ShowWindow(SW_SHOW); |
+ // Save away our HWND in the parent window as a property so that the |
+ // accessibility code can find it. |
+ accessibility_prop_.reset(new ViewProp(GetParent(), |
+ kViewsNativeHostPropForAccessibility, |
+ m_hWnd)); |
+ |
DidBecomeSelected(); |
} |
@@ -575,6 +581,8 @@ |
return; |
} |
+ accessibility_prop_.reset(); |
+ |
if (::GetFocus() == m_hWnd) |
::SetFocus(NULL); |
ShowWindow(SW_HIDE); |
@@ -832,11 +840,6 @@ |
// Marks that window as supporting mouse-wheel messages rerouting so it is |
// scrolled when under the mouse pointer even if inactive. |
props_.push_back(views::SetWindowSupportsRerouteMouseWheel(m_hWnd)); |
- // Save away our HWND in the parent window as a property so that the |
- // accessibility code can find it. |
- props_.push_back(new ViewProp(GetParent(), |
- kViewsNativeHostPropForAccessibility, |
- m_hWnd)); |
props_.push_back(new ViewProp(m_hWnd, kRenderWidgetHostViewKey, |
static_cast<RenderWidgetHostView*>(this))); |
return 0; |