Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index b519b0eb4e61a6085809ac89d5358eb825bfd4ec..5cc133dab37978dde1ef10f50e626cc31b5d63f7 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -2236,13 +2236,17 @@ void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) { |
state = BookmarkBar::HIDDEN; |
} |
+ |
dhollowa
2013/01/17 17:47:58
nit: extra line
sail
2013/01/17 18:17:12
Done.
|
// Don't allow the bookmark bar to be shown in suggestions mode or |
// for instant extended api, non-NTP modes when it's detached. |
+ // TODO(sail): Stop hidding the bookmark bar on other platforms. |
+#if !defined(OS_MACOSX) |
if (search_model_->mode().is_search_suggestions() || |
(chrome::search::IsInstantExtendedAPIEnabled(profile_) && |
dhollowa
2013/01/17 17:47:58
nit: The |IsInstantExtendedAPIEnabled| part of thi
sail
2013/01/17 18:17:12
Done.
|
!search_model_->mode().is_ntp() && state == BookmarkBar::DETACHED)) { |
state = BookmarkBar::HIDDEN; |
} |
+#endif |
if (state == bookmark_bar_state_) |
return; |
@@ -2259,15 +2263,20 @@ void Browser::UpdateBookmarkBarState(BookmarkBarStateChangeReason reason) { |
return; |
} |
+ bool shouldAnimate = reason == BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE; |
+ |
// Don't animate if mode is |NTP| because the bookmark is attached at top when |
// pref is on and detached at bottom when off. |
- BookmarkBar::AnimateChangeType animate_type = |
- ((reason == BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE && |
- !search_model_->mode().is_ntp()) || |
- reason == BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE) ? |
+ // TODO(sail) Remove this once other platforms have removed the bottom |
+ // bookmark bar. |
+#if !defined(OS_MACOSX) |
+ shouldAnimate = (shouldAnimate && !search_model_->mode().is_ntp()) || |
+ reason == BOOKMARK_BAR_STATE_CHANGE_INSTANT_PREVIEW_STATE; |
kuan
2013/01/17 18:25:51
per latest discussion, we don't want to animate fo
sail
2013/01/17 18:54:55
Done.
|
+#endif |
+ |
+ window_->BookmarkBarStateChanged(shouldAnimate ? |
BookmarkBar::ANIMATE_STATE_CHANGE : |
- BookmarkBar::DONT_ANIMATE_STATE_CHANGE; |
- window_->BookmarkBarStateChanged(animate_type); |
+ BookmarkBar::DONT_ANIMATE_STATE_CHANGE); |
} |
bool Browser::ShouldHideUIForFullscreen() const { |