diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 05:43:17 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 05:43:17 +0000 |
commit | a8da3a55ce6358c92cc976f105567f67789a2510 (patch) | |
tree | 26f58f20a9ab36ffe2cc8d563edacec5dfc7d3dd /chrome/browser | |
parent | f73bdc8c33f0b395ba058083505209baeedf9f38 (diff) | |
download | chromium_src-a8da3a55ce6358c92cc976f105567f67789a2510.zip chromium_src-a8da3a55ce6358c92cc976f105567f67789a2510.tar.gz chromium_src-a8da3a55ce6358c92cc976f105567f67789a2510.tar.bz2 |
Make HWNDViewContainer set up its contents view separately from its Init method.
This is needed as a first step in further adjustments I'm going to be making to
Window, ClientView, etc.
B=1280060
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/find_in_page_controller.cc | 3 | ||||
-rw-r--r-- | chrome/browser/native_ui_contents.cc | 2 | ||||
-rw-r--r-- | chrome/browser/network_status_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tabs/dragged_tab_view.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tabs/hwnd_photobooth.cc | 2 | ||||
-rw-r--r-- | chrome/browser/tabs/tab_strip.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/download_started_animation.cc | 3 | ||||
-rw-r--r-- | chrome/browser/views/info_bubble.cc | 3 | ||||
-rw-r--r-- | chrome/browser/views/status_bubble.cc | 4 | ||||
-rw-r--r-- | chrome/browser/web_contents.cc | 2 |
10 files changed, 16 insertions, 11 deletions
diff --git a/chrome/browser/find_in_page_controller.cc b/chrome/browser/find_in_page_controller.cc index 1129dc1..aa73a18 100644 --- a/chrome/browser/find_in_page_controller.cc +++ b/chrome/browser/find_in_page_controller.cc @@ -85,7 +85,8 @@ FindInPageController::FindInPageController(TabContents* parent_tab, gfx::Rect find_dlg_rect = GetDialogPosition(gfx::Rect()); set_window_style(WS_CHILD | WS_CLIPCHILDREN); set_window_ex_style(WS_EX_TOPMOST); - HWNDViewContainer::Init(parent_hwnd, find_dlg_rect, view_, false); + HWNDViewContainer::Init(parent_hwnd, find_dlg_rect, false); + SetContentsView(view_); // Start the process of animating the opening of the window. animation_.reset(new SlideAnimation(this)); diff --git a/chrome/browser/native_ui_contents.cc b/chrome/browser/native_ui_contents.cc index e36361f..ff7b24d 100644 --- a/chrome/browser/native_ui_contents.cc +++ b/chrome/browser/native_ui_contents.cc @@ -173,7 +173,7 @@ NativeUIContents::~NativeUIContents() { void NativeUIContents::CreateView(HWND parent_hwnd, const gfx::Rect& initial_bounds) { set_delete_on_destroy(false); - HWNDViewContainer::Init(parent_hwnd, initial_bounds, NULL, false); + HWNDViewContainer::Init(parent_hwnd, initial_bounds, false); } LRESULT NativeUIContents::OnCreate(LPCREATESTRUCT create_struct) { diff --git a/chrome/browser/network_status_view.cc b/chrome/browser/network_status_view.cc index a05a01b..d901324 100644 --- a/chrome/browser/network_status_view.cc +++ b/chrome/browser/network_status_view.cc @@ -147,7 +147,8 @@ void NetworkStatusView::OnCreate(const CRect& rect) { // Graphical report of page loading page_load_view_ = new PageLoadView(); page_view_container_ = new ChromeViews::HWNDViewContainer; - page_view_container_->Init(m_hWnd, gfx::Rect(rect), page_load_view_, false); + page_view_container_->Init(m_hWnd, gfx::Rect(rect), false); + page_view_container_->SetContentsView(page_load_view_); HideProfilingResults(); } diff --git a/chrome/browser/tabs/dragged_tab_view.cc b/chrome/browser/tabs/dragged_tab_view.cc index d452290..bf1a0ba 100644 --- a/chrome/browser/tabs/dragged_tab_view.cc +++ b/chrome/browser/tabs/dragged_tab_view.cc @@ -68,7 +68,8 @@ DraggedTabView::DraggedTabView(TabContents* datasource, container_->set_window_ex_style( WS_EX_LAYERED | WS_EX_TOPMOST | WS_EX_TOOLWINDOW); container_->set_can_update_layered_window(false); - container_->Init(NULL, gfx::Rect(0, 0, 0, 0), this, false); + container_->Init(NULL, gfx::Rect(0, 0, 0, 0), false); + container_->SetContentsView(this); } DraggedTabView::~DraggedTabView() { diff --git a/chrome/browser/tabs/hwnd_photobooth.cc b/chrome/browser/tabs/hwnd_photobooth.cc index d8a9348..f44c724 100644 --- a/chrome/browser/tabs/hwnd_photobooth.cc +++ b/chrome/browser/tabs/hwnd_photobooth.cc @@ -173,7 +173,7 @@ void HWNDPhotobooth::CreateCaptureWindow(HWND initial_hwnd) { // WS_EX_TOOLWINDOW ensures the capture window doesn't produce a Taskbar // button. capture_window_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW); - capture_window_->Init(NULL, capture_bounds, NULL, false); + capture_window_->Init(NULL, capture_bounds, false); // If the capture window isn't visible, blitting from the TabContents' // HWND's DC to the capture bitmap produces blankness. capture_window_->ShowWindow(SW_SHOWNOACTIVATE); diff --git a/chrome/browser/tabs/tab_strip.cc b/chrome/browser/tabs/tab_strip.cc index e3755a4..e6539a9 100644 --- a/chrome/browser/tabs/tab_strip.cc +++ b/chrome/browser/tabs/tab_strip.cc @@ -1264,8 +1264,8 @@ TabStrip::DropInfo::DropInfo(int drop_index, bool drop_before, bool point_down) arrow_window->Init( NULL, gfx::Rect(0, 0, drop_indicator_width, drop_indicator_height), - arrow_view, true); + arrow_window->SetContentsView(arrow_view); } TabStrip::DropInfo::~DropInfo() { diff --git a/chrome/browser/views/download_started_animation.cc b/chrome/browser/views/download_started_animation.cc index 3131a31..d66b789 100644 --- a/chrome/browser/views/download_started_animation.cc +++ b/chrome/browser/views/download_started_animation.cc @@ -74,7 +74,8 @@ DownloadStartedAnimation::DownloadStartedAnimation(TabContents* tab_contents) popup_->set_window_ex_style(WS_EX_LAYERED | WS_EX_TOOLWINDOW | WS_EX_TRANSPARENT); popup_->SetLayeredAlpha(0x00); - popup_->Init(tab_contents_->GetContainerHWND(), rc, this, false); + popup_->Init(tab_contents_->GetContainerHWND(), rc, false); + popup_->SetContentsView(this); Reposition(); popup_->ShowWindow(SW_SHOWNOACTIVATE); diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc index b307a98..a9671f6 100644 --- a/chrome/browser/views/info_bubble.cc +++ b/chrome/browser/views/info_bubble.cc @@ -132,7 +132,8 @@ void InfoBubble::Init(HWND parent_hwnd, (win_util::GetWinVersion() < win_util::WINVERSION_XP) ? 0 : CS_DROPSHADOW); - HWNDViewContainer::Init(parent_hwnd, bounds, content_view_, true); + HWNDViewContainer::Init(parent_hwnd, bounds, true); + SetContentsView(content_view_); // The preferred size may differ when parented. Ask for the bounds again // and if they differ reset the bounds. gfx::Rect parented_bounds = content_view_-> diff --git a/chrome/browser/views/status_bubble.cc b/chrome/browser/views/status_bubble.cc index 69985cd..04b44f3 100644 --- a/chrome/browser/views/status_bubble.cc +++ b/chrome/browser/views/status_bubble.cc @@ -505,8 +505,8 @@ void StatusBubble::Init() { WS_EX_TRANSPARENT | l10n_util::GetExtendedTooltipStyles()); popup_->SetLayeredAlpha(0x00); - popup_->Init(frame_->GetHWND(), rc, view_, - false); + popup_->Init(frame_->GetHWND(), rc, false); + popup_->SetContentsView(view_); Reposition(); popup_->ShowWindow(SW_SHOWNOACTIVATE); } diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index 6d55ed8..8ee43e3 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -275,7 +275,7 @@ WebContents::~WebContents() { void WebContents::CreateView(HWND parent_hwnd, const gfx::Rect& initial_bounds) { set_delete_on_destroy(false); - HWNDViewContainer::Init(parent_hwnd, initial_bounds, NULL, false); + HWNDViewContainer::Init(parent_hwnd, initial_bounds, false); // Remove the root view drop target so we can register our own. RevokeDragDrop(GetHWND()); |