Chromium Code Reviews| Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| index e55eb2e077f93eae060943e45e6c22ac6b17bf00..159c40be337240871c90d54ba68e3fed5e2247d2 100644 |
| --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc |
| @@ -89,6 +89,7 @@ |
| #include "ui/gfx/color_utils.h" |
| #include "ui/gfx/favicon_size.h" |
| #include "ui/gfx/geometry/rect.h" |
| +#include "ui/gfx/image/image_skia_operations.h" |
| #include "ui/gfx/paint_vector_icon.h" |
| #include "ui/gfx/scoped_canvas.h" |
| #include "ui/gfx/text_constants.h" |
| @@ -1785,10 +1786,20 @@ void BookmarkBarView::ConfigureButton(const BookmarkNode* node, |
| button->set_context_menu_controller(this); |
| button->set_drag_controller(this); |
| if (node->is_url()) { |
| - const gfx::Image& favicon = model_->GetFavicon(node); |
| - button->SetImage(views::Button::STATE_NORMAL, |
| - favicon.IsEmpty() ? *GetImageSkiaNamed(IDR_DEFAULT_FAVICON) |
| - : *favicon.ToImageSkia()); |
| + // Themify chrome:// favicons and the default one. |
|
Peter Kasting
2016/06/30 00:07:04
Nit: Might want to add "This ensures they're visib
Evan Stade
2016/06/30 15:39:45
Done.
|
| + bool themify_icon = node->url().SchemeIs(content::kChromeUIScheme); |
| + gfx::ImageSkia favicon = model_->GetFavicon(node).AsImageSkia(); |
| + if (favicon.isNull()) { |
| + favicon = *GetImageSkiaNamed(IDR_DEFAULT_FAVICON); |
| + themify_icon = true; |
| + } |
| + |
| + if (themify_icon && GetThemeProvider()) { |
| + favicon = gfx::ImageSkiaOperations::CreateHSLShiftedImage( |
| + favicon, GetThemeProvider()->GetTint(ThemeProperties::TINT_BUTTONS)); |
| + } |
| + |
| + button->SetImage(views::Button::STATE_NORMAL, favicon); |
| } |
| button->SetMaxSize(gfx::Size(kMaxButtonWidth, 0)); |
| } |