summaryrefslogtreecommitdiffstats
path: root/chrome/browser/web_contents_view_win.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-17 21:29:15 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-17 21:29:15 +0000
commit325ff88aecfd0b14ee2b69c6d5eb0e0ed7764cf9 (patch)
tree35cbc99b42ae6e4cca2202f132ffc12188c3b18c /chrome/browser/web_contents_view_win.cc
parent44d11123d43b38956b7c2224e0d6aa2d48acbb3c (diff)
downloadchromium_src-325ff88aecfd0b14ee2b69c6d5eb0e0ed7764cf9.zip
chromium_src-325ff88aecfd0b14ee2b69c6d5eb0e0ed7764cf9.tar.gz
chromium_src-325ff88aecfd0b14ee2b69c6d5eb0e0ed7764cf9.tar.bz2
Rollback! Now with 25% more HWND.
:-/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents_view_win.cc')
-rw-r--r--chrome/browser/web_contents_view_win.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/web_contents_view_win.cc b/chrome/browser/web_contents_view_win.cc
index 7c369f7..dcf8136 100644
--- a/chrome/browser/web_contents_view_win.cc
+++ b/chrome/browser/web_contents_view_win.cc
@@ -52,9 +52,10 @@ WebContents* WebContentsViewWin::GetWebContents() {
return web_contents_;
}
-void WebContentsViewWin::CreateView() {
+void WebContentsViewWin::CreateView(HWND parent_hwnd,
+ const gfx::Rect& initial_bounds) {
set_delete_on_destroy(false);
- ContainerWin::Init(GetDesktopWindow(), gfx::Rect(), false);
+ ContainerWin::Init(parent_hwnd, initial_bounds, false);
// Remove the root view drop target so we can register our own.
RevokeDragDrop(GetHWND());
@@ -364,7 +365,13 @@ WebContents* WebContentsViewWin::CreateNewWindowInternal(
new_contents->SetupController(web_contents_->profile());
WebContentsView* new_view = new_contents->view();
- new_view->CreateView();
+ // TODO(beng)
+ // The intention here is to create background tabs, which should ideally
+ // be parented to NULL. However doing that causes the corresponding view
+ // container windows to show up as overlapped windows, which causes
+ // other issues. We should fix this.
+ HWND new_view_parent_window = ::GetAncestor(GetContainerHWND(), GA_ROOT);
+ new_view->CreateView(new_view_parent_window, gfx::Rect());
// TODO(brettw) it seems bogus that we have to call this function on the
// newly created object and give it one of its own member variables.