| Index: chrome/browser/ui/cocoa/hover_close_button.mm
|
| diff --git a/chrome/browser/ui/cocoa/hover_close_button.mm b/chrome/browser/ui/cocoa/hover_close_button.mm
|
| index f025a588d8a0e66fcc21c1e5632edd1532124ed4..973ef4ff3b15314ac7ef512d32141b784f28ab9c 100644
|
| --- a/chrome/browser/ui/cocoa/hover_close_button.mm
|
| +++ b/chrome/browser/ui/cocoa/hover_close_button.mm
|
| @@ -59,16 +59,18 @@ const SkColor kDefaultIconColor = SkColorSetARGB(0xA0, 0x00, 0x00, 0x00);
|
| gTooltip = [l10n_util::GetNSStringWithFixup(IDS_TOOLTIP_CLOSE_TAB) copy];
|
| }
|
|
|
| -- (id)initWithFrame:(NSRect)frameRect {
|
| - if ((self = [super initWithFrame:frameRect])) {
|
| - [self commonInit];
|
| - }
|
| - return self;
|
| -}
|
| +- (void)commonInit {
|
| + [super commonInit];
|
| +
|
| + [self setAccessibilityTitle:nil];
|
| +
|
| + // Add a tooltip. Using 'owner:self' means that
|
| + // -view:stringForToolTip:point:userData: will be called to provide the
|
| + // tooltip contents immediately before showing it.
|
| + [self addToolTipRect:[self bounds] owner:self userData:NULL];
|
|
|
| -- (void)awakeFromNib {
|
| - [super awakeFromNib];
|
| - [self commonInit];
|
| + previousState_ = kHoverStateNone;
|
| + iconColor_ = kDefaultIconColor;
|
| }
|
|
|
| - (void)removeFromSuperview {
|
| @@ -198,18 +200,6 @@ const SkColor kDefaultIconColor = SkColorSetARGB(0xA0, 0x00, 0x00, 0x00);
|
| }
|
| }
|
|
|
| -- (void)commonInit {
|
| - [self setAccessibilityTitle:nil];
|
| -
|
| - // Add a tooltip. Using 'owner:self' means that
|
| - // -view:stringForToolTip:point:userData: will be called to provide the
|
| - // tooltip contents immediately before showing it.
|
| - [self addToolTipRect:[self bounds] owner:self userData:NULL];
|
| -
|
| - previousState_ = kHoverStateNone;
|
| - iconColor_ = kDefaultIconColor;
|
| -}
|
| -
|
| // Called each time a tooltip is about to be shown.
|
| - (NSString*)view:(NSView*)view
|
| stringForToolTip:(NSToolTipTag)tag
|
|
|