| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Padding between buttons. | 104 // Padding between buttons. |
| 105 static const int kButtonPadding = 0; | 105 static const int kButtonPadding = 0; |
| 106 | 106 |
| 107 // Icon to display when one isn't found for the page. | 107 // Icon to display when one isn't found for the page. |
| 108 static gfx::ImageSkia* kDefaultFavicon = NULL; | 108 static gfx::ImageSkia* kDefaultFavicon = NULL; |
| 109 | 109 |
| 110 // Icon used for folders. | 110 // Icon used for folders. |
| 111 static gfx::ImageSkia* kFolderIcon = NULL; | 111 static gfx::ImageSkia* kFolderIcon = NULL; |
| 112 | 112 |
| 113 // Offset for where the menu is shown relative to the bottom of the | |
| 114 // BookmarkBarView. | |
| 115 static const int kMenuOffset = 3; | |
| 116 | |
| 117 // Color of the drop indicator. | 113 // Color of the drop indicator. |
| 118 static const SkColor kDropIndicatorColor = SK_ColorBLACK; | 114 static const SkColor kDropIndicatorColor = SK_ColorBLACK; |
| 119 | 115 |
| 120 // Width of the drop indicator. | 116 // Width of the drop indicator. |
| 121 static const int kDropIndicatorWidth = 2; | 117 static const int kDropIndicatorWidth = 2; |
| 122 | 118 |
| 123 // Distance between the bottom of the bar and the separator. | 119 // Distance between the bottom of the bar and the separator. |
| 124 static const int kSeparatorMargin = 1; | 120 static const int kSeparatorMargin = 1; |
| 125 | 121 |
| 126 // Width of the separator between the recently bookmarked button and the | 122 // Width of the separator between the recently bookmarked button and the |
| (...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1856 DCHECK(apps_page_shortcut_); | 1852 DCHECK(apps_page_shortcut_); |
| 1857 // Only perform layout if required. | 1853 // Only perform layout if required. |
| 1858 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1854 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
| 1859 browser_->profile()); | 1855 browser_->profile()); |
| 1860 if (apps_page_shortcut_->visible() == visible) | 1856 if (apps_page_shortcut_->visible() == visible) |
| 1861 return; | 1857 return; |
| 1862 apps_page_shortcut_->SetVisible(visible); | 1858 apps_page_shortcut_->SetVisible(visible); |
| 1863 UpdateBookmarksSeparatorVisibility(); | 1859 UpdateBookmarksSeparatorVisibility(); |
| 1864 Layout(); | 1860 Layout(); |
| 1865 } | 1861 } |
| OLD | NEW |