Index: chrome/browser/ui/cocoa/tabs/tab_controller.mm |
diff --git a/chrome/browser/ui/cocoa/tabs/tab_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_controller.mm |
index eb315143e36a9015ef5f0d9a1b35b3b701ec6ff3..34ab2a25f84508fbdc33de68d96f471e79f33a83 100644 |
--- a/chrome/browser/ui/cocoa/tabs/tab_controller.mm |
+++ b/chrome/browser/ui/cocoa/tabs/tab_controller.mm |
@@ -12,6 +12,7 @@ |
#import "chrome/browser/themes/theme_properties.h" |
#import "chrome/browser/themes/theme_service.h" |
#import "chrome/browser/ui/cocoa/sprite_view.h" |
+#include "chrome/browser/ui/cocoa/tab_contents/favicon_util_mac.h" |
#import "chrome/browser/ui/cocoa/tabs/alert_indicator_button_cocoa.h" |
#import "chrome/browser/ui/cocoa/tabs/tab_controller_target.h" |
#import "chrome/browser/ui/cocoa/tabs/tab_view.h" |
@@ -28,6 +29,7 @@ |
@synthesize pinned = pinned_; |
@synthesize target = target_; |
@synthesize url = url_; |
+@synthesize shouldUseDefaultFavicon = shouldUseDefaultFavicon_; |
namespace TabControllerInternal { |
@@ -171,6 +173,7 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate { |
} |
[self updateVisibility]; |
[self updateTitleColor]; |
+ [self updateDefaultFavicon]; |
} |
// Called when Cocoa wants to display the context menu. Lazily instantiate |
@@ -456,8 +459,16 @@ class MenuDelegate : public ui::SimpleMenuModel::Delegate { |
[[self tabView] setTitleColor:titleColor ? titleColor : [NSColor textColor]]; |
} |
+- (void)updateDefaultFavicon { |
+ if (ui::MaterialDesignController::IsModeMaterial() && |
+ shouldUseDefaultFavicon_) { |
+ [self setIconImage:mac::DefaultFavicon([[self tabView] iconColor])]; |
+ } |
+} |
+ |
- (void)themeChangedNotification:(NSNotification*)notification { |
[self updateTitleColor]; |
+ [self updateDefaultFavicon]; |
} |
// Called by the tabs to determine whether we are in rapid (tab) closure mode. |