Index: ui/views/controls/native/native_view_host_win.cc |
diff --git a/ui/views/controls/native/native_view_host_win.cc b/ui/views/controls/native/native_view_host_win.cc |
index e7b74c3c7a1671709d7e26dede7d58db05cfec53..45de684f71d5df3c18157ca44d4586a66761d770 100644 |
--- a/ui/views/controls/native/native_view_host_win.cc |
+++ b/ui/views/controls/native/native_view_host_win.cc |
@@ -32,10 +32,14 @@ NativeViewHostWin::~NativeViewHostWin() { |
//////////////////////////////////////////////////////////////////////////////// |
// NativeViewHostWin, NativeViewHostWrapper implementation: |
-void NativeViewHostWin::NativeViewWillAttach() { |
+void NativeViewHostWin::AttachNativeView() { |
// First hide the new window. We don't want anything to draw (like sub-hwnd |
- // borders), when NativeViewHost changes the parent. |
+ // borders), when the parent changes. |
ShowWindow(host_->native_view(), SW_HIDE); |
+ |
+ Widget::ReparentNativeView(host_->native_view(), |
+ host_->GetWidget()->GetNativeView()); |
+ |
} |
void NativeViewHostWin::NativeViewDetaching(bool destroyed) { |