summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 18:30:31 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-09 18:30:31 +0000
commitba67fd826eb0bb0abf37aa96757a558e4c804610 (patch)
tree0cb2fb9e62d7bfe023ac37ac986d8790f23f68ea /chrome
parent55846ad8432f07ebc6fce2fafadffe60a5bab246 (diff)
downloadchromium_src-ba67fd826eb0bb0abf37aa96757a558e4c804610.zip
chromium_src-ba67fd826eb0bb0abf37aa96757a558e4c804610.tar.gz
chromium_src-ba67fd826eb0bb0abf37aa96757a558e4c804610.tar.bz2
Infobars would not show up in chrome frame rendered pages due to a change in the root view Layout code which does not give
the child views a chance to process the layout if a layout manager existed for the root view. The default layout manager for the root view is the FillView. Fix is to handle layout correctly in the ExternalTabContainer in the InfoBarSizeChanged notification by maintaining the current grid view in a member and invoking layout on it. This fixes bug http://code.google.com/p/chromium/issues/detail?id=48569 Bug=48569 Review URL: http://codereview.chromium.org/2963002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/external_tab_container_win.cc20
-rw-r--r--chrome/browser/external_tab_container_win.h2
2 files changed, 13 insertions, 9 deletions
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 4e22b3e..116b7a5 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -59,7 +59,8 @@ ExternalTabContainer::ExternalTabContainer(
waiting_for_unload_event_(false),
pending_(false),
infobars_enabled_(true),
- focus_manager_(NULL) {
+ focus_manager_(NULL),
+ external_tab_view_(NULL) {
}
ExternalTabContainer::~ExternalTabContainer() {
@@ -189,6 +190,7 @@ void ExternalTabContainer::Uninitialize() {
focus_manager_ = NULL;
}
+ external_tab_view_ = NULL;
request_context_ = NULL;
tab_contents_container_ = NULL;
}
@@ -797,8 +799,8 @@ void ExternalTabContainer::SetEnableExtensionAutomation(
}
void ExternalTabContainer::InfoBarSizeChanged(bool is_animating) {
- if (GetRootView()) {
- GetRootView()->Layout();
+ if (external_tab_view_) {
+ external_tab_view_->Layout();
}
}
@@ -949,14 +951,14 @@ void ExternalTabContainer::SetupExternalTabView() {
// The views created here will be destroyed when the ExternalTabContainer
// widget is torn down.
- views::View* external_tab_view = new views::View();
+ external_tab_view_ = new views::View();
InfoBarContainer* info_bar_container = new InfoBarContainer(this);
info_bar_container->ChangeTabContents(tab_contents_);
- views::GridLayout* layout = new views::GridLayout(external_tab_view);
- views::ColumnSet* columns = layout->AddColumnSet(0); // Give this column an
- // identifier of 0.
+ views::GridLayout* layout = new views::GridLayout(external_tab_view_);
+ // Give this column an identifier of 0.
+ views::ColumnSet* columns = layout->AddColumnSet(0);
columns->AddColumn(views::GridLayout::FILL,
views::GridLayout::FILL,
1,
@@ -964,13 +966,13 @@ void ExternalTabContainer::SetupExternalTabView() {
0,
0);
- external_tab_view->SetLayoutManager(layout);
+ external_tab_view_->SetLayoutManager(layout);
layout->StartRow(0, 0);
layout->AddView(info_bar_container);
layout->StartRow(1, 0);
layout->AddView(tab_contents_container_);
- SetContentsView(external_tab_view);
+ SetContentsView(external_tab_view_);
// Note that SetTabContents must be called after AddChildView is called
tab_contents_container_->ChangeTabContents(tab_contents_);
}
diff --git a/chrome/browser/external_tab_container_win.h b/chrome/browser/external_tab_container_win.h
index 6306749..731f07d 100644
--- a/chrome/browser/external_tab_container_win.h
+++ b/chrome/browser/external_tab_container_win.h
@@ -330,6 +330,8 @@ class ExternalTabContainer : public TabContentsDelegate,
views::FocusManager* focus_manager_;
+ views::View* external_tab_view_;
+
DISALLOW_COPY_AND_ASSIGN(ExternalTabContainer);
};