| Index: content/browser/web_contents/web_contents_view_win.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_win.cc b/content/browser/web_contents/web_contents_view_win.cc
|
| index 8f14e28a811594b3f1991e03c2bfb0ed775d5378..23a0734551973349be08d789cd533736bc2f5867 100644
|
| --- a/content/browser/web_contents/web_contents_view_win.cc
|
| +++ b/content/browser/web_contents/web_contents_view_win.cc
|
| @@ -15,6 +15,7 @@
|
| #include "content/browser/web_contents/web_drag_dest_win.h"
|
| #include "content/public/browser/web_contents_delegate.h"
|
| #include "content/public/browser/web_contents_view_delegate.h"
|
| +#include "ui/base/win/hidden_window.h"
|
| #include "ui/base/win/hwnd_subclass.h"
|
| #include "ui/gfx/screen.h"
|
|
|
| @@ -37,43 +38,6 @@ WebContentsView* CreateWebContentsView(
|
|
|
| namespace {
|
|
|
| -// We need to have a parent window for the compositing code to work correctly.
|
| -//
|
| -// A tab will not have a parent HWND whenever it is not active in its
|
| -// host window - for example at creation time and when it's in the
|
| -// background, so we provide a default widget to host them.
|
| -//
|
| -// It may be tempting to use GetDesktopWindow() instead, but this is
|
| -// problematic as the shell sends messages to children of the desktop
|
| -// window that interact poorly with us.
|
| -//
|
| -// See: http://crbug.com/16476
|
| -class TempParent : public ui::WindowImpl {
|
| - public:
|
| - static TempParent* Get() {
|
| - static TempParent* g_temp_parent;
|
| - if (!g_temp_parent) {
|
| - g_temp_parent = new TempParent();
|
| -
|
| - g_temp_parent->set_window_style(WS_POPUP);
|
| - g_temp_parent->set_window_ex_style(WS_EX_TOOLWINDOW);
|
| - g_temp_parent->Init(GetDesktopWindow(), gfx::Rect());
|
| - EnableWindow(g_temp_parent->hwnd(), FALSE);
|
| - }
|
| - return g_temp_parent;
|
| - }
|
| -
|
| - private:
|
| - // Explicitly do nothing in Close. We do this as some external apps may get a
|
| - // handle to this window and attempt to close it.
|
| - void OnClose() {
|
| - }
|
| -
|
| - BEGIN_MSG_MAP_EX(WebContentsViewWin)
|
| - MSG_WM_CLOSE(OnClose)
|
| - END_MSG_MAP()
|
| -};
|
| -
|
| typedef std::map<HWND, WebContentsViewWin*> HwndToWcvMap;
|
| HwndToWcvMap hwnd_to_wcv_map;
|
|
|
| @@ -151,7 +115,7 @@ void WebContentsViewWin::CreateView(const gfx::Size& initial_size) {
|
|
|
| set_window_style(WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
|
|
|
| - Init(TempParent::Get()->hwnd(), gfx::Rect(initial_size_));
|
| + Init(ui::GetHiddenWindow(), gfx::Rect(initial_size_));
|
|
|
| // Remove the root view drop target so we can register our own.
|
| RevokeDragDrop(GetNativeView());
|
|
|