summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_contents_controller.mm
diff options
context:
space:
mode:
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
//--------------------------------------------------------------------------