summaryrefslogtreecommitdiffstats
path: root/chrome/browser/vista_frame.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/vista_frame.cc')
-rw-r--r--chrome/browser/vista_frame.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/vista_frame.cc b/chrome/browser/vista_frame.cc
index b1b0ebb3..779ada5 100644
--- a/chrome/browser/vista_frame.cc
+++ b/chrome/browser/vista_frame.cc
@@ -649,6 +649,19 @@ void VistaFrame::ProfileChanged(Profile* profile) {
void VistaFrame::FocusToolbar() {
}
+bool VistaFrame::IsBookmarkBarVisible() const {
+ if (!bookmark_bar_view_.get())
+ return false;
+
+ if (bookmark_bar_view_->IsNewTabPage() || bookmark_bar_view_->IsAnimating())
+ return true;
+
+ CSize sz;
+ bookmark_bar_view_->GetPreferredSize(&sz);
+ // 1 is the minimum in GetPreferredSize for the bookmark bar.
+ return sz.cy > 1;
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// Events