diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 00:28:35 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 00:28:35 +0000 |
commit | 20ede07176ece47e95efa8f355ee68a61166b68c (patch) | |
tree | 87b994d26fba0129ab5c28998f7ba9e99c04c735 /chrome/browser/tab_contents | |
parent | 48285173b623d950ecb04be6fd120f464c447e61 (diff) | |
download | chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.zip chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.tar.gz chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.tar.bz2 |
Mac: Implements the special bookmark bar on NTP.
Based mostly on Ben's patch, but made it compile, work, and descoped
moving the bookmark bar around the view heiarchy.
XIB modification: The root view is now a BookmarkBarToolbarView instead of an NSView and is [BookmarkBarController view].
BUG=17625
Review URL: http://codereview.chromium.org/246034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 6 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index f220074..315934e 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -977,7 +977,7 @@ void TabContents::ReplaceInfoBar(InfoBarDelegate* old_delegate, infobar_delegates_.push_back(new_delegate); } -bool TabContents::IsBookmarkBarAlwaysVisible() { +bool TabContents::ShouldShowBookmarkBar() { // See GetDOMUIForCurrentState() comment for more info. This case is very // similar, but for non-first loads, we want to use the committed entry. This // is so the bookmarks bar disappears at the same time the page does. @@ -1996,12 +1996,12 @@ void TabContents::DidNavigate(RenderViewHost* rvh, int extra_invalidate_flags = 0; if (PageTransition::IsMainFrame(params.transition)) { - bool was_bookmark_bar_visible = IsBookmarkBarAlwaysVisible(); + bool was_bookmark_bar_visible = ShouldShowBookmarkBar(); bool was_extension_shelf_visible = IsExtensionShelfAlwaysVisible(); render_manager_.DidNavigateMainFrame(rvh); - if (was_bookmark_bar_visible != IsBookmarkBarAlwaysVisible()) + if (was_bookmark_bar_visible != ShouldShowBookmarkBar()) extra_invalidate_flags |= INVALIDATE_BOOKMARK_BAR; if (was_extension_shelf_visible != IsExtensionShelfAlwaysVisible()) extra_invalidate_flags |= INVALIDATE_EXTENSION_SHELF; diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index f892775..3a09eb5 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -109,7 +109,7 @@ class TabContents : public PageNavigator, // changed. INVALIDATE_LOAD = 1 << 2, // The loading state has changed. INVALIDATE_PAGE_ACTIONS = 1 << 3, // Page action icons have changed. - INVALIDATE_BOOKMARK_BAR = 1 << 4, // State of IsBookmarkBarAlwaysVisible + INVALIDATE_BOOKMARK_BAR = 1 << 4, // State of ShouldShowBookmarkBar // changed. INVALIDATE_EXTENSION_SHELF = 1 << 5, // State of // IsExtensionShelfAlwaysVisible @@ -436,8 +436,8 @@ class TabContents : public PageNavigator, // Toolbars and such --------------------------------------------------------- - // Returns whether the bookmark bar should be visible. - virtual bool IsBookmarkBarAlwaysVisible(); + // Returns true if a Bookmark Bar should be shown for this tab. + virtual bool ShouldShowBookmarkBar(); // Returns whether the extension shelf should be visible. virtual bool IsExtensionShelfAlwaysVisible(); |