diff options
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/download_item_controller.mm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm index ec6fe8e..7b32994 100644 --- a/chrome/browser/cocoa/download_item_controller.mm +++ b/chrome/browser/cocoa/download_item_controller.mm @@ -9,11 +9,12 @@ #include "app/resource_bundle.h" #include "base/mac_util.h" #include "base/sys_string_conversions.h" +#import "chrome/browser/browser_theme_provider.h" #import "chrome/browser/cocoa/download_item_button.h" #import "chrome/browser/cocoa/download_item_cell.h" #include "chrome/browser/cocoa/download_item_mac.h" #import "chrome/browser/cocoa/download_shelf_controller.h" -#import "chrome/browser/cocoa/GTMTheme.h" +#import "chrome/browser/cocoa/themed_window.h" #import "chrome/browser/cocoa/ui_localizer.h" #include "chrome/browser/download/download_item_model.h" #include "chrome/browser/download/download_shelf.h" @@ -69,7 +70,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { @interface DownloadItemController (Private) - (void)themeDidChangeNotification:(NSNotification*)aNotification; -- (void)updateTheme:(GTMTheme*)theme; +- (void)updateTheme:(ThemeProvider*)themeProvider; - (void)setState:(DownoadItemState)state; @end @@ -88,7 +89,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter]; [defaultCenter addObserver:self selector:@selector(themeDidChangeNotification:) - name:kGTMThemeDidChangeNotification + name:kBrowserThemeDidChangeNotification object:nil]; shelf_ = shelf; @@ -187,7 +188,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { - (void)updateVisibility:(id)sender { if ([[self view] window]) - [self updateTheme:[[self view] gtm_theme]]; + [self updateTheme:[[[self view] window] themeProvider]]; // TODO(thakis): Make this prettier, by fading the items out or overlaying // the partial visible one with a horizontal alpha gradient -- crbug.com/17830 @@ -240,15 +241,16 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { // Called after the current theme has changed. - (void)themeDidChangeNotification:(NSNotification*)aNotification { - GTMTheme* theme = [aNotification object]; - [self updateTheme:theme]; + ThemeProvider* themeProvider = + static_cast<ThemeProvider*>([[aNotification object] pointerValue]); + [self updateTheme:themeProvider]; } // Adapt appearance to the current theme. Called after theme changes and before // this is shown for the first time. -- (void)updateTheme:(GTMTheme*)theme { - NSColor* color = [theme textColorForStyle:GTMThemeStyleTabBarSelected - state:GTMThemeStateActiveWindow]; +- (void)updateTheme:(ThemeProvider*)themeProvider { + NSColor* color = + themeProvider->GetNSColor(BrowserThemeProvider::COLOR_TAB_TEXT, true); [dangerousDownloadLabel_ setTextColor:color]; } |