| Index: chrome/browser/ui/cocoa/toolbar/reload_button_cocoa.mm
|
| diff --git a/chrome/browser/ui/cocoa/toolbar/reload_button_cocoa.mm b/chrome/browser/ui/cocoa/toolbar/reload_button_cocoa.mm
|
| index 8f1c05bd0d012834ea4b3933f3b5607b0c97bb4b..9740529df95cdd77877254adcb1ab631f6889008 100644
|
| --- a/chrome/browser/ui/cocoa/toolbar/reload_button_cocoa.mm
|
| +++ b/chrome/browser/ui/cocoa/toolbar/reload_button_cocoa.mm
|
| @@ -122,7 +122,7 @@ const int kReloadMenuCommands[] = {
|
| return;
|
| }
|
|
|
| - [self resetIcons];
|
| + [self resetButtonStateImages];
|
| if (anInt == IDC_RELOAD) {
|
| [self setToolTip:l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_RELOAD)];
|
| } else if (anInt == IDC_STOP) {
|
| @@ -156,7 +156,7 @@ const int kReloadMenuCommands[] = {
|
| [[self cell] isMouseInside]) {
|
| id cell = [self cell];
|
| if (ui::MaterialDesignController::IsModeMaterial()) {
|
| - [self setImagesFromIconId:gfx::VectorIconId::NAVIGATE_STOP];
|
| + [self resetButtonStateImages];
|
| NSImage* disabledStopImage =
|
| [[self cell] imageForState:image_button_cell::kDisabledState
|
| view:self];
|
| @@ -236,6 +236,18 @@ const int kReloadMenuCommands[] = {
|
| return VIEW_ID_RELOAD_BUTTON;
|
| }
|
|
|
| +- (gfx::VectorIconId)vectorIconId {
|
| + if ([self tag] == IDC_RELOAD) {
|
| + return gfx::VectorIconId::NAVIGATE_RELOAD;
|
| + } else if ([self tag] == IDC_STOP) {
|
| + return gfx::VectorIconId::NAVIGATE_STOP;
|
| + } else {
|
| + NOTREACHED();
|
| + }
|
| +
|
| + return gfx::VectorIconId::VECTOR_ICON_NONE;
|
| +}
|
| +
|
| - (void)mouseInsideStateDidChange:(BOOL)isInside {
|
| [pendingReloadTimer_ fire];
|
| }
|
| @@ -286,25 +298,6 @@ const int kReloadMenuCommands[] = {
|
| command, ui::DispositionFromEventFlags(event_flags));
|
| }
|
|
|
| -- (void)resetIcons {
|
| - if ([self tag] == IDC_RELOAD) {
|
| - [self setImagesFromIconId:gfx::VectorIconId::NAVIGATE_RELOAD];
|
| - } else if ([self tag] == IDC_STOP) {
|
| - [self setImagesFromIconId:gfx::VectorIconId::NAVIGATE_STOP];
|
| - } else {
|
| - NOTREACHED();
|
| - }
|
| -}
|
| -
|
| -- (void)viewDidMoveToWindow {
|
| - // If a dark theme in Material Design, make sure the icon is the correct
|
| - // color.
|
| - if ([self window] && ui::MaterialDesignController::IsModeMaterial() &&
|
| - [[self window] hasDarkTheme]) {
|
| - [self resetIcons];
|
| - }
|
| -}
|
| -
|
| @end // ReloadButton
|
|
|
| @implementation ReloadButton (Testing)
|
|
|