| Index: chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm b/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
|
| index b5c54fafd59adbccfd1223c35bc5f9573f2be763..0693a2e220d43b5538dbc7f8407d9e2972d83615 100644
|
| --- a/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/toolbar/toolbar_button_cocoa.mm
|
| @@ -153,10 +153,6 @@ @implementation ToolbarButton
|
| @synthesize handleMiddleClick = handleMiddleClick_;
|
|
|
| + (NSSize)toolbarButtonSize {
|
| - if (!ui::MaterialDesignController::IsModeMaterial()) {
|
| - return NSMakeSize(29, 29);
|
| - }
|
| -
|
| return kMDButtonBounds.size;
|
| }
|
|
|
| @@ -235,11 +231,7 @@ - (NSImage*)browserToolsIconForFillColor:(SkColor)fillColor {
|
| [[BrowserToolsImageRep alloc]
|
| initWithDrawSelector:@selector(drawBrowserToolsIcon:)
|
| delegate:[BrowserToolsImageRep class]]);
|
| - if (!ui::MaterialDesignController::IsModeMaterial()) {
|
| - [imageRep setFillColor:skia::SkColorToCalibratedNSColor(fillColor)];
|
| - } else {
|
| - [imageRep setFillColor:skia::SkColorToSRGBNSColor(fillColor)];
|
| - }
|
| + [imageRep setFillColor:skia::SkColorToSRGBNSColor(fillColor)];
|
|
|
| // Create the image from the image rep.
|
| NSImage* browserToolsIcon =
|
| @@ -271,19 +263,11 @@ - (NSImage*)imageForIcon:(NSImage*)iconImage
|
| }
|
|
|
| - (NSImage*)image {
|
| - if (!ui::MaterialDesignController::IsModeMaterial()) {
|
| - return [super image];
|
| - }
|
| // setImage: stores the image in an ivar.
|
| return image_.get();
|
| }
|
|
|
| - (void)setImage:(NSImage*)anImage {
|
| - if (!ui::MaterialDesignController::IsModeMaterial()) {
|
| - [super setImage:anImage];
|
| - return;
|
| - }
|
| -
|
| // We want to set the default image as the image for kDefaultState. Setting it
|
| // as the default image (via setImage:) can cause ghosting from the two
|
| // default images being drawn over each other. However we also need to keep
|
| @@ -294,8 +278,6 @@ - (void)setImage:(NSImage*)anImage {
|
| }
|
|
|
| - (void)resetButtonStateImages {
|
| - DCHECK(ui::MaterialDesignController::IsModeMaterial());
|
| -
|
| NSImage* normalIcon = nil;
|
| NSImage* disabledIcon = nil;
|
| BOOL isDarkTheme = NO;
|
| @@ -383,7 +365,7 @@ - (void)viewDidMoveToWindow {
|
| // In Material Design we want to catch when the button is attached to its
|
| // window so that we can configure its appearance based on the window's
|
| // theme.
|
| - if ([self window] && ui::MaterialDesignController::IsModeMaterial()) {
|
| + if ([self window]) {
|
| [self resetButtonStateImages];
|
| }
|
| }
|
| @@ -392,9 +374,7 @@ - (void)viewDidMoveToWindow {
|
|
|
| - (void)windowDidChangeTheme {
|
| // Update the hover and pressed image backgrounds to match the current theme.
|
| - if (ui::MaterialDesignController::IsModeMaterial()) {
|
| - [self resetButtonStateImages];
|
| - }
|
| + [self resetButtonStateImages];
|
| }
|
|
|
| - (void)windowDidChangeActive {
|
|
|