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-19 22:53:30 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-19 22:53:30 +0000
commitec322ff6c39bf30e9b3c1eb878a95507029c6002 (patch)
tree186cb72db581cab4643182d47f040b65b1addb46 /chrome/browser/web_contents_view_win.cc
parentf3f568b18078fa29f9b84cd66bd2d1029ce408a1 (diff)
downloadchromium_src-ec322ff6c39bf30e9b3c1eb878a95507029c6002.zip
chromium_src-ec322ff6c39bf30e9b3c1eb878a95507029c6002.tar.gz
chromium_src-ec322ff6c39bf30e9b3c1eb878a95507029c6002.tar.bz2
Re-land this change: http://codereview.chromium.org/10967/show
Now with two improvements: - no longer create WebContentsViews as WS_VISIBLE, to prevent them from showing up in the taskbar - make sure overridden CreateView in NativeUIContents and StatusView have the correct signature. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/web_contents_view_win.cc')
-rw-r--r--chrome/browser/web_contents_view_win.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/chrome/browser/web_contents_view_win.cc b/chrome/browser/web_contents_view_win.cc
index 90da9cd..30665ea 100644
--- a/chrome/browser/web_contents_view_win.cc
+++ b/chrome/browser/web_contents_view_win.cc
@@ -52,10 +52,12 @@ WebContents* WebContentsViewWin::GetWebContents() {
return web_contents_;
}
-void WebContentsViewWin::CreateView(HWND parent_hwnd,
- const gfx::Rect& initial_bounds) {
+void WebContentsViewWin::CreateView() {
set_delete_on_destroy(false);
- ContainerWin::Init(parent_hwnd, initial_bounds, false);
+ // Since we create these windows parented to the desktop window initially, we
+ // don't want to create them initially visible.
+ set_window_style(WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
+ ContainerWin::Init(GetDesktopWindow(), gfx::Rect(), false);
// Remove the root view drop target so we can register our own.
RevokeDragDrop(GetHWND());
@@ -365,13 +367,7 @@ WebContents* WebContentsViewWin::CreateNewWindowInternal(
new_contents->SetupController(web_contents_->profile());
WebContentsView* new_view = new_contents->view();
- // 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());
+ new_view->CreateView();
// 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.