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

Unified Diff: chrome/browser/views/old_frames/vista_frame.cc

Issue 7155: Fix bug where a shelf or infobar would not be closed correctly when closing a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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
« no previous file with comments | « chrome/browser/views/old_frames/vista_frame.h ('k') | chrome/browser/views/old_frames/xp_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/old_frames/vista_frame.cc
===================================================================
--- chrome/browser/views/old_frames/vista_frame.cc (revision 3362)
+++ chrome/browser/views/old_frames/vista_frame.cc (working copy)
@@ -128,6 +128,7 @@
shelf_view_(NULL),
bookmark_bar_view_(NULL),
info_bar_view_(NULL),
+ needs_layout_(false),
is_off_the_record_(false),
off_the_record_image_(NULL),
distributor_logo_(NULL),
@@ -386,6 +387,7 @@
browser_view_->LayoutStatusBubble(browser_y + browser_h);
frame_view_->SchedulePaint();
+ needs_layout_ = false;
}
////////////////////////////////////////////////////////////////////////////////
@@ -1607,30 +1609,28 @@
void VistaFrame::ShelfVisibilityChangedImpl(TabContents* current_tab) {
// Coalesce layouts.
- bool changed = false;
-
ChromeViews::View* new_shelf = NULL;
if (current_tab && current_tab->IsDownloadShelfVisible())
new_shelf = current_tab->GetDownloadShelfView();
- changed |= UpdateChildViewAndLayout(new_shelf, &shelf_view_);
+ needs_layout_ |= UpdateChildViewAndLayout(new_shelf, &shelf_view_);
ChromeViews::View* new_info_bar = NULL;
WebContents* web_contents = current_tab ? current_tab->AsWebContents() : NULL;
if (web_contents && web_contents->view()->IsInfoBarVisible())
new_info_bar = web_contents->view()->GetInfoBarView();
- changed |= UpdateChildViewAndLayout(new_info_bar, &info_bar_view_);
+ needs_layout_ |= UpdateChildViewAndLayout(new_info_bar, &info_bar_view_);
ChromeViews::View* new_bookmark_bar_view = NULL;
if (SupportsBookmarkBar())
new_bookmark_bar_view = GetBookmarkBarView();
- changed |= UpdateChildViewAndLayout(new_bookmark_bar_view,
- &active_bookmark_bar_);
+ needs_layout_ |= UpdateChildViewAndLayout(new_bookmark_bar_view,
+ &active_bookmark_bar_);
// Only do a layout if the current contents is non-null. We assume that if the
// contents is NULL, we're either being destroyed, or ShowTabContents is going
// to be invoked with a non-null TabContents again so that there is no need
// in doing a layout now (and would result in extra work/invalidation on
// tab switches).
- if (changed && current_tab)
+ if (needs_layout_ && current_tab)
Layout();
}
« no previous file with comments | « chrome/browser/views/old_frames/vista_frame.h ('k') | chrome/browser/views/old_frames/xp_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698