| Index: chrome/browser/ui/cocoa/image_button_cell.mm
|
| diff --git a/chrome/browser/ui/cocoa/image_button_cell.mm b/chrome/browser/ui/cocoa/image_button_cell.mm
|
| index 773c91d6c8963043d1477df5381f4a29f457ec5c..35dede3732e9654fa2fa025c172f988185b43c2c 100644
|
| --- a/chrome/browser/ui/cocoa/image_button_cell.mm
|
| +++ b/chrome/browser/ui/cocoa/image_button_cell.mm
|
| @@ -59,7 +59,7 @@ const CGFloat kImageNoFocusAlpha = 0.65;
|
| return image_[state].image;
|
| }
|
|
|
| -- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
|
| +- (void)drawImageWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
|
| image_button_cell::ButtonState state = [self currentButtonState];
|
| BOOL windowHasFocus = [[controlView window] isMainWindow] ||
|
| [[controlView window] isKeyWindow];
|
| @@ -97,8 +97,14 @@ const CGFloat kImageNoFocusAlpha = 0.65;
|
| fraction:alpha
|
| respectFlipped:YES
|
| hints:nil];
|
| +}
|
|
|
| - [self drawFocusRingWithFrame:cellFrame inView:controlView];
|
| +- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
|
| + [self drawImageWithFrame:cellFrame inView:controlView];
|
| + // Only draw custom focus ring if the 10.7 focus ring APIs are not available.
|
| + // TODO(groby): Remove once we build against the 10.7 SDK.
|
| + if (![self respondsToSelector:@selector(drawFocusRingMaskWithFrame:inView:)])
|
| + [self drawFocusRingWithFrame:cellFrame inView:controlView];
|
| }
|
|
|
| - (void)setImageID:(NSInteger)imageID
|
|
|