summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/tab_controller.mm
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 20:46:37 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 20:46:37 +0000
commit1ae99501e0a15b85f0593a71c939063027c802d4 (patch)
treeae2c255da0ff4687c78b2a017dd1b660a8ed343c /chrome/browser/cocoa/tab_controller.mm
parentf8fc92385be0fb12cfffd14db9c6f3b461bec447 (diff)
downloadchromium_src-1ae99501e0a15b85f0593a71c939063027c802d4.zip
chromium_src-1ae99501e0a15b85f0593a71c939063027c802d4.tar.gz
chromium_src-1ae99501e0a15b85f0593a71c939063027c802d4.tar.bz2
Implement a status throbber on the mac, currently using the Win artwork. Made the tab cell use a generic NSView for showing the icon instead of relying on the NSButtonCell to draw it, so a NSImageView is in place by default. Remove un-needed outlets, bindings, and views from the nib. BUG=11916. TEST=loading pages, opening and closing tabs.
Review URL: http://codereview.chromium.org/115527 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16410 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_controller.mm')
-rw-r--r--chrome/browser/cocoa/tab_controller.mm17
1 files changed, 14 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/tab_controller.mm b/chrome/browser/cocoa/tab_controller.mm
index 027f709..c5aae1a 100644
--- a/chrome/browser/cocoa/tab_controller.mm
+++ b/chrome/browser/cocoa/tab_controller.mm
@@ -8,8 +8,8 @@
@implementation TabController
-@synthesize image = image_;
@synthesize loading = loading_;
+@synthesize waiting = waiting_;
@synthesize target = target_;
@synthesize action = action_;
@@ -23,13 +23,11 @@
- (id)init {
self = [super initWithNibName:@"TabView" bundle:mac_util::MainAppBundle()];
if (self != nil) {
- [self setImage:[NSImage imageNamed:@"nav"]];
}
return self;
}
- (void)dealloc {
- [image_ release];
[super dealloc];
}
@@ -44,6 +42,7 @@
// Called when the tab's nib is done loading and all outlets are hooked up.
- (void)awakeFromNib {
+ [(id)iconView_ setImage:[NSImage imageNamed:@"nav"]];
[[self view] addSubview:backgroundButton_
positioned:NSWindowBelow
relativeTo:nil];
@@ -66,4 +65,16 @@
return selected_;
}
+- (void)setIconView:(NSView*)iconView {
+ NSRect currentFrame = [iconView_ frame];
+ [iconView_ removeFromSuperview];
+ iconView_ = iconView;
+ [iconView_ setFrame:currentFrame];
+ [[self view] addSubview:iconView_];
+}
+
+- (NSView*)iconView {
+ return iconView_;
+}
+
@end