summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/download_item_controller.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 01:22:15 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 01:22:15 +0000
commit8c3ba4d09e4d94decf1cb1759a0c58fa7459e6ef (patch)
tree678f0426ae32e7dc48c8572fa4e8d3c1cf360d80 /chrome/browser/cocoa/download_item_controller.mm
parent9492e4abf1be2910ab72f300abb7e0f28118b434 (diff)
downloadchromium_src-8c3ba4d09e4d94decf1cb1759a0c58fa7459e6ef.zip
chromium_src-8c3ba4d09e4d94decf1cb1759a0c58fa7459e6ef.tar.gz
chromium_src-8c3ba4d09e4d94decf1cb1759a0c58fa7459e6ef.tar.bz2
Next batch of changes to kill GTMTheme.
BUG=http://crbug.com/35554 TEST=no visible change in normal mode; incognito mode still being worked on Review URL: http://codereview.chromium.org/652179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/download_item_controller.mm')
-rw-r--r--chrome/browser/cocoa/download_item_controller.mm20
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];
}