diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-13 19:03:31 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-13 19:03:31 +0000 |
commit | 9a56a0d8a1304ce392580319a066c0c1857a210e (patch) | |
tree | 188158d67d2446f7969f2dff588a6cfa02968974 /chrome/browser/external_tab_container_win.cc | |
parent | 1357ae79b9d474da177632a85227efb676c6d98e (diff) | |
download | chromium_src-9a56a0d8a1304ce392580319a066c0c1857a210e.zip chromium_src-9a56a0d8a1304ce392580319a066c0c1857a210e.tar.gz chromium_src-9a56a0d8a1304ce392580319a066c0c1857a210e.tar.bz2 |
Re-land:
Split the hierarchy.
Now with AutocompletePopup implementing SupportsWeakPtr as before. This fixes the Windows XP crashes in browser_tests.
BUG=72040
TEST=none
Review URL: http://codereview.chromium.org/7015051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85298 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_tab_container_win.cc')
-rw-r--r-- | chrome/browser/external_tab_container_win.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc index dd9784b..b3787d7 100644 --- a/chrome/browser/external_tab_container_win.cc +++ b/chrome/browser/external_tab_container_win.cc @@ -87,7 +87,8 @@ base::LazyInstance<ExternalTabContainer::PendingTabs> ExternalTabContainer::ExternalTabContainer( AutomationProvider* automation, AutomationResourceMessageFilter* filter) - : automation_(automation), + : views::WidgetWin(new views::Widget), + automation_(automation), tab_contents_container_(NULL), tab_handle_(0), ignore_next_load_notification_(false), @@ -137,6 +138,7 @@ bool ExternalTabContainer::Init(Profile* profile, views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); params.bounds = bounds; + params.native_widget = this; GetWidget()->Init(params); if (!IsWindow()) { NOTREACHED(); @@ -217,9 +219,8 @@ void ExternalTabContainer::Uninitialize() { if (tab_contents_.get()) { UnregisterRenderViewHost(tab_contents_->render_view_host()); - if (GetRootView()) { - GetRootView()->RemoveAllChildViews(true); - } + if (GetWidget()->GetRootView()) + GetWidget()->GetRootView()->RemoveAllChildViews(true); NotificationService::current()->Notify( NotificationType::EXTERNAL_TAB_CLOSED, @@ -571,7 +572,7 @@ void ExternalTabContainer::ShowPageInfo(Profile* profile, PageInfoBubbleView* page_info_bubble = new ExternalTabPageInfoBubbleView(this, NULL, profile, url, ssl, show_history); - Bubble* bubble = Bubble::Show(this, bounds, BubbleBorder::TOP_LEFT, + Bubble* bubble = Bubble::Show(GetWidget(), bounds, BubbleBorder::TOP_LEFT, page_info_bubble, page_info_bubble); page_info_bubble->set_bubble(bubble); } @@ -1002,7 +1003,7 @@ void ExternalTabContainer::LoadAccelerators() { CopyAcceleratorTable(accelerator_table, accelerators, count); - focus_manager_ = GetFocusManager(); + focus_manager_ = GetWidget()->GetFocusManager(); DCHECK(focus_manager_); // Let's fill our own accelerator table. @@ -1078,7 +1079,7 @@ void ExternalTabContainer::SetupExternalTabView() { layout->AddView(info_bar_container); layout->StartRow(1, 0); layout->AddView(tab_contents_container_); - SetContentsView(external_tab_view_); + GetWidget()->SetContentsView(external_tab_view_); // Note that SetTabContents must be called after AddChildView is called tab_contents_container_->ChangeTabContents(tab_contents()); } |