Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Unified Diff: chrome/browser/ui/cocoa/image_button_cell.mm

Issue 803613002: [Extensions Toolbar Mac] Allow the overflow toolbar to use the theme provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/image_button_cell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/ui/cocoa/image_button_cell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698