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

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 28191: Fixes regression where bookmark bar would appear all black. Actually,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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/frame/browser_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 10408)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -195,8 +195,7 @@
personalization_enabled_(false),
personalization_(NULL),
#endif
- forwarding_to_tab_strip_(false),
- is_removing_bookmark_bar_(false) {
+ forwarding_to_tab_strip_(false) {
InitClass();
browser_->tabstrip_model()->AddObserver(this);
}
@@ -701,8 +700,8 @@
bool BrowserView::IsBookmarkBarVisible() const {
return SupportsWindowFeature(FEATURE_BOOKMARKBAR) &&
- bookmark_bar_view_.get() &&
- (bookmark_bar_view_->GetPreferredSize().height() != 0);
+ active_bookmark_bar_ &&
+ (active_bookmark_bar_->GetPreferredSize().height() != 0);
}
gfx::Rect BrowserView::GetRootWindowResizerRect() const {
@@ -1354,7 +1353,7 @@
int BrowserView::LayoutBookmarkAndInfoBars(int top) {
find_bar_y_ = top + y() - 1;
- if (bookmark_bar_view_.get()) {
+ if (active_bookmark_bar_) {
// If we're showing the Bookmark bar in detached style, then we need to show
// any Info bar _above_ the Bookmark bar, since the Bookmark bar is styled
// to look like it's part of the page.
@@ -1368,7 +1367,7 @@
}
int BrowserView::LayoutBookmarkBar(int top) {
- DCHECK(bookmark_bar_view_.get());
+ DCHECK(active_bookmark_bar_);
bool visible = IsBookmarkBarVisible();
int height, y = top;
if (visible) {
@@ -1422,9 +1421,8 @@
bool BrowserView::MaybeShowBookmarkBar(TabContents* contents) {
views::View* new_bookmark_bar_view = NULL;
- views::View* old_bookmark_bar_view = bookmark_bar_view_.get();
if (SupportsWindowFeature(FEATURE_BOOKMARKBAR) && contents) {
- if (!old_bookmark_bar_view) {
+ if (!bookmark_bar_view_.get()) {
bookmark_bar_view_.reset(new BookmarkBarView(contents->profile(),
browser_.get()));
bookmark_bar_view_->SetParentOwned(false);
@@ -1434,11 +1432,7 @@
bookmark_bar_view_->SetPageNavigator(contents);
new_bookmark_bar_view = bookmark_bar_view_.get();
}
- is_removing_bookmark_bar_ = true;
- bool result = UpdateChildViewAndLayout(new_bookmark_bar_view,
- &old_bookmark_bar_view);
- is_removing_bookmark_bar_ = false;
- return result;
+ return UpdateChildViewAndLayout(new_bookmark_bar_view, &active_bookmark_bar_);
}
bool BrowserView::MaybeShowInfoBar(TabContents* contents) {
« no previous file with comments | « chrome/browser/views/frame/browser_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698