diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 01:41:13 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 01:41:13 +0000 |
commit | ee81de2a38a40c70f096e15780b28b89bfacd819 (patch) | |
tree | 210b8dcc124a4f5a64be4b6ed6adcd453ceb8c2b /chrome/browser/cocoa/download_item_controller.mm | |
parent | 5999209ebf35148c2ee8dd0bc1cdbbcfc61c5ddd (diff) | |
download | chromium_src-ee81de2a38a40c70f096e15780b28b89bfacd819.zip chromium_src-ee81de2a38a40c70f096e15780b28b89bfacd819.tar.gz chromium_src-ee81de2a38a40c70f096e15780b28b89bfacd819.tar.bz2 |
Reverting r39825.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39830 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/download_item_controller.mm | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/chrome/browser/cocoa/download_item_controller.mm b/chrome/browser/cocoa/download_item_controller.mm index 7b32994..ec6fe8e 100644 --- a/chrome/browser/cocoa/download_item_controller.mm +++ b/chrome/browser/cocoa/download_item_controller.mm @@ -9,12 +9,11 @@ #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/themed_window.h" +#import "chrome/browser/cocoa/GTMTheme.h" #import "chrome/browser/cocoa/ui_localizer.h" #include "chrome/browser/download/download_item_model.h" #include "chrome/browser/download/download_shelf.h" @@ -70,7 +69,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { @interface DownloadItemController (Private) - (void)themeDidChangeNotification:(NSNotification*)aNotification; -- (void)updateTheme:(ThemeProvider*)themeProvider; +- (void)updateTheme:(GTMTheme*)theme; - (void)setState:(DownoadItemState)state; @end @@ -89,7 +88,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter]; [defaultCenter addObserver:self selector:@selector(themeDidChangeNotification:) - name:kBrowserThemeDidChangeNotification + name:kGTMThemeDidChangeNotification object:nil]; shelf_ = shelf; @@ -188,7 +187,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { - (void)updateVisibility:(id)sender { if ([[self view] window]) - [self updateTheme:[[[self view] window] themeProvider]]; + [self updateTheme:[[self view] gtm_theme]]; // TODO(thakis): Make this prettier, by fading the items out or overlaying // the partial visible one with a horizontal alpha gradient -- crbug.com/17830 @@ -241,16 +240,15 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu { // Called after the current theme has changed. - (void)themeDidChangeNotification:(NSNotification*)aNotification { - ThemeProvider* themeProvider = - static_cast<ThemeProvider*>([[aNotification object] pointerValue]); - [self updateTheme:themeProvider]; + GTMTheme* theme = [aNotification object]; + [self updateTheme:theme]; } // Adapt appearance to the current theme. Called after theme changes and before // this is shown for the first time. -- (void)updateTheme:(ThemeProvider*)themeProvider { - NSColor* color = - themeProvider->GetNSColor(BrowserThemeProvider::COLOR_TAB_TEXT, true); +- (void)updateTheme:(GTMTheme*)theme { + NSColor* color = [theme textColorForStyle:GTMThemeStyleTabBarSelected + state:GTMThemeStateActiveWindow]; [dangerousDownloadLabel_ setTextColor:color]; } |