Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6562)

Unified Diff: chrome/browser/external_tab_container_win.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
}
« no previous file with comments | « chrome/browser/chromeos/panels/panel_scroller.cc ('k') | chrome/browser/first_run/try_chrome_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698