Index: chrome/browser/external_tab_container_win.cc |
=================================================================== |
--- chrome/browser/external_tab_container_win.cc (revision 85284) |
+++ chrome/browser/external_tab_container_win.cc (working copy) |
@@ -87,7 +87,8 @@ |
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 @@ |
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 @@ |
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 @@ |
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 @@ |
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 @@ |
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()); |
} |