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

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 771353004: Make sure Legacy HWND is created and has proper bounds on bounds change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@legacy_fix_ondestroy
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a8357355ca5a8c71ff16d123be1add1f3619e773..4aa74eb1794c98e0e0f03e9967c71d4dca866d88 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1478,6 +1478,17 @@ void WebContentsViewAura::OnBoundsChanged(const gfx::Rect& old_bounds,
window_->children()[i]->SetBounds(bounds);
}
}
+
+#if defined(OS_WIN)
+ if (!legacy_hwnd_ && window_ && window_->GetHost()) {
+ HWND parent_hwnd = window_->GetHost()->GetAcceleratedWidget();
+ CHECK(parent_hwnd);
ananta 2014/12/05 19:58:02 Please verify if this does not crash in Windows 8
dmazzoni 2014/12/05 20:56:06 Verified manually. This same CHECK appears above t
+ legacy_hwnd_.reset(LegacyRenderWidgetHostHWND::Create(parent_hwnd, this));
+ }
+
+ if (legacy_hwnd_)
+ legacy_hwnd_->SetBounds(window_->GetBoundsInRootWindow());
+#endif
}
gfx::NativeCursor WebContentsViewAura::GetCursor(const gfx::Point& point) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698