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 6572d2b4d73d78f8301a504df684c9705f9bcb7a..ac155151058123f93839eaef46275fec062a4525 100644 |
--- a/chrome/browser/ui/cocoa/image_button_cell.mm |
+++ b/chrome/browser/ui/cocoa/image_button_cell.mm |
@@ -132,6 +132,10 @@ const CGFloat kImageNoFocusAlpha = 0.65; |
return windowHasFocus ? 1.0 : kImageNoFocusAlpha; |
} |
+- (ui::ThemeProvider*)themeProviderForWindow:(NSWindow*)window { |
+ return [window themeProvider]; |
+} |
+ |
- (void)drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView*)controlView { |
if (![self showsFirstResponder]) |
return; |
@@ -166,7 +170,8 @@ const CGFloat kImageNoFocusAlpha = 0.65; |
if (!imageID) |
return nil; |
- ui::ThemeProvider* themeProvider = [[controlView window] themeProvider]; |
+ ui::ThemeProvider* themeProvider = |
+ [self themeProviderForWindow:[controlView window]]; |
if (!themeProvider) |
return nil; |