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

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

Issue 796243002: Merge to M40: Make sure Legacy HWND is created and has proper bounds on bounds change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
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 056bb3e3cc38ad5f1ff95e155db4d468ce26633a..328d1c65c81336796910da3b54e603e89e64990d 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1471,6 +1471,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);
+ 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