OLD | NEW |
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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 } | 709 } |
710 | 710 |
711 bool BookmarkBarView::IsOnTop() const { | 711 bool BookmarkBarView::IsOnTop() const { |
712 return true; | 712 return true; |
713 } | 713 } |
714 | 714 |
715 double BookmarkBarView::GetAnimationValue() const { | 715 double BookmarkBarView::GetAnimationValue() const { |
716 return size_animation_->GetCurrentValue(); | 716 return size_animation_->GetCurrentValue(); |
717 } | 717 } |
718 | 718 |
| 719 int BookmarkBarView::GetToolbarOverlap() const { |
| 720 return GetToolbarOverlap(false); |
| 721 } |
| 722 |
719 bool BookmarkBarView::IsAlwaysShown() const { | 723 bool BookmarkBarView::IsAlwaysShown() const { |
720 return profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); | 724 return profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); |
721 } | 725 } |
722 | 726 |
723 bool BookmarkBarView::OnNewTabPage() const { | 727 bool BookmarkBarView::OnNewTabPage() const { |
724 return (browser_ && browser_->GetSelectedTabContents() && | 728 return (browser_ && browser_->GetSelectedTabContents() && |
725 browser_->GetSelectedTabContents()->ShouldShowBookmarkBar()); | 729 browser_->GetSelectedTabContents()->ShouldShowBookmarkBar()); |
726 } | 730 } |
727 | 731 |
728 int BookmarkBarView::GetToolbarOverlap(bool return_max) const { | 732 int BookmarkBarView::GetToolbarOverlap(bool return_max) const { |
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 // The tooltip is the only way we have to display text explaining the error | 1758 // The tooltip is the only way we have to display text explaining the error |
1755 // to the user. | 1759 // to the user. |
1756 sync_error_button->SetTooltipText( | 1760 sync_error_button->SetTooltipText( |
1757 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC))); | 1761 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC))); |
1758 sync_error_button->SetAccessibleName( | 1762 sync_error_button->SetAccessibleName( |
1759 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON)); | 1763 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON)); |
1760 sync_error_button->SetIcon( | 1764 sync_error_button->SetIcon( |
1761 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); | 1765 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); |
1762 return sync_error_button; | 1766 return sync_error_button; |
1763 } | 1767 } |
OLD | NEW |