summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_contents_controller.mm
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 14:45:03 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-17 14:45:03 +0000
commit93ca8ed5063f03b0b8c0745a33080a5b9c43b19e (patch)
tree61ec51f3c879e98dc67a60348aa3ae963a339004 /chrome/browser/cocoa/tab_contents_controller.mm
parentd166778946fbef7731106cf2e4b17b58e847da24 (diff)
downloadchromium_src-93ca8ed5063f03b0b8c0745a33080a5b9c43b19e.zip
chromium_src-93ca8ed5063f03b0b8c0745a33080a5b9c43b19e.tar.gz
chromium_src-93ca8ed5063f03b0b8c0745a33080a5b9c43b19e.tar.bz2
Implement SetStarredState on LocationBar for Mac.
Review URL: http://codereview.chromium.org/21317 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_contents_controller.mm')
-rw-r--r--chrome/browser/cocoa/tab_contents_controller.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/tab_contents_controller.mm b/chrome/browser/cocoa/tab_contents_controller.mm
index 83d9c7d..b338745 100644
--- a/chrome/browser/cocoa/tab_contents_controller.mm
+++ b/chrome/browser/cocoa/tab_contents_controller.mm
@@ -12,6 +12,10 @@
// For now, tab_contents lives here. TODO(port):fix
#include "chrome/common/temp_scaffolding_stubs.h"
+// Names of images in the bundle for the star icon (normal and 'starred').
+static NSString* const kStarImageName = @"star";
+static NSString* const kStarredImageName = @"starred";
+
@interface TabContentsController(CommandUpdates)
- (void)enabledStateChangedForCommand:(NSInteger)command enabled:(BOOL)enabled;
@end
@@ -186,6 +190,13 @@ class LocationBarBridge : public LocationBar {
}
}
+- (void)setStarredState:(BOOL)isStarred {
+ NSString* starImageName = kStarImageName;
+ if (isStarred)
+ starImageName = kStarredImageName;
+ [starButton_ setImage:[NSImage imageNamed:starImageName]];
+}
+
@end
//--------------------------------------------------------------------------