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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 6913026: Compact Navigation prototype (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 return (browser_ && browser_->GetSelectedTabContents() && 727 return (browser_ && browser_->GetSelectedTabContents() &&
728 browser_->GetSelectedTabContents()->ShouldShowBookmarkBar()); 728 browser_->GetSelectedTabContents()->ShouldShowBookmarkBar());
729 } 729 }
730 730
731 int BookmarkBarView::GetToolbarOverlap(bool return_max) const { 731 int BookmarkBarView::GetToolbarOverlap(bool return_max) const {
732 // When not on the New Tab Page, always overlap by the full amount. 732 // When not on the New Tab Page, always overlap by the full amount.
733 if (return_max || !OnNewTabPage()) 733 if (return_max || !OnNewTabPage())
734 return kToolbarOverlap; 734 return kToolbarOverlap;
735 // When on the New Tab Page with an infobar, overlap by 0 whenever the infobar 735 // When on the New Tab Page with an infobar, overlap by 0 whenever the infobar
736 // is above us (i.e. when we're detached), since drawing over the infobar 736 // is above us (i.e. when we're detached), since drawing over the infobar
737 // looks weird. 737 // looks weird. If we're in compact nav mode, also overlap by zero.
Peter Kasting 2011/05/03 18:04:24 Nit: This additional comment just restates the cod
SteveT 2011/05/06 18:48:43 Turns out this check isn't necessary anymore. It w
738 if (IsDetached() && infobar_visible_) 738 if ((IsDetached() && infobar_visible_) || browser()->UseCompactNavigationBar() )
Peter Kasting 2011/05/03 18:04:24 Nit: 80 columns
sky 2011/05/03 18:38:32 > 80. Also, NULL check browser_.
SteveT 2011/05/06 18:48:43 Done.
SteveT 2011/05/06 18:48:43 Done.
739 return 0; 739 return 0;
740 // When on the New Tab Page with no infobar, animate the overlap between the 740 // When on the New Tab Page with no infobar, animate the overlap between the
741 // attached and detached states. 741 // attached and detached states.
742 return static_cast<int>(kToolbarOverlap * size_animation_->GetCurrentValue()); 742 return static_cast<int>(kToolbarOverlap * size_animation_->GetCurrentValue());
743 } 743 }
744 744
745 bool BookmarkBarView::is_animating() { 745 bool BookmarkBarView::is_animating() {
746 return size_animation_->is_animating(); 746 return size_animation_->is_animating();
747 } 747 }
748 748
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 // The tooltip is the only way we have to display text explaining the error 1780 // The tooltip is the only way we have to display text explaining the error
1781 // to the user. 1781 // to the user.
1782 sync_error_button->SetTooltipText( 1782 sync_error_button->SetTooltipText(
1783 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC))); 1783 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)));
1784 sync_error_button->SetAccessibleName( 1784 sync_error_button->SetAccessibleName(
1785 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1785 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1786 sync_error_button->SetIcon( 1786 sync_error_button->SetIcon(
1787 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1787 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1788 return sync_error_button; 1788 return sync_error_button;
1789 } 1789 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698