| Index: content/browser/web_contents/web_contents_view_aura.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
| index 783fccc0b8f4c61f985a18e3ea8c06e9aa59c195..1544b19bb7dcf11393179926f0986ce1f8c4172c 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -745,7 +745,8 @@ class WebContentsViewAura::WindowObserver
|
| WebContentsViewAura::WebContentsViewAura(
|
| WebContentsImpl* web_contents,
|
| WebContentsViewDelegate* delegate)
|
| - : web_contents_(web_contents),
|
| + : WebContentsObserver(web_contents),
|
| + web_contents_(web_contents),
|
| delegate_(delegate),
|
| current_drag_op_(blink::WebDragOperationNone),
|
| drag_dest_delegate_(NULL),
|
| @@ -1646,6 +1647,12 @@ int WebContentsViewAura::OnPerformDrop(const ui::DropTargetEvent& event) {
|
| return ConvertFromWeb(current_drag_op_);
|
| }
|
|
|
| +void WebContentsViewAura::RenderProcessGone(base::TerminationStatus status) {
|
| +#if defined(OS_WIN)
|
| + UpdateLegacyHwndVisibility();
|
| +#endif
|
| +}
|
| +
|
| void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window,
|
| bool visible) {
|
| // Ignore any visibility changes in the hierarchy below.
|
| @@ -1678,9 +1685,18 @@ void WebContentsViewAura::UpdateWebContentsVisibility(bool visible) {
|
| }
|
|
|
| #if defined(OS_WIN)
|
| + UpdateLegacyHwndVisibility();
|
| +#endif
|
| +}
|
| +
|
| +#if defined(OS_WIN)
|
| +void WebContentsViewAura::UpdateLegacyHwndVisibility() {
|
| if (!legacy_hwnd_)
|
| return;
|
|
|
| + bool visible = (window_->IsVisible() &&
|
| + web_contents_->GetRenderWidgetHostView());
|
| +
|
| if (visible && GetNativeView() && GetNativeView()->GetHost()) {
|
| legacy_hwnd_->UpdateParent(
|
| GetNativeView()->GetHost()->GetAcceleratedWidget());
|
| @@ -1692,10 +1708,8 @@ void WebContentsViewAura::UpdateWebContentsVisibility(bool visible) {
|
| legacy_hwnd_->UpdateParent(ui::GetHiddenWindow());
|
| legacy_hwnd_->Hide();
|
| }
|
| -#endif
|
| }
|
|
|
| -#if defined(OS_WIN)
|
| gfx::NativeViewAccessible
|
| WebContentsViewAura::GetNativeViewAccessible() {
|
| BrowserAccessibilityManager* manager =
|
|
|