| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/cocoa/tab_controller.h" | 5 #import "chrome/browser/cocoa/tab_controller.h" |
| 6 | 6 |
| 7 @implementation TabController | 7 @implementation TabController |
| 8 | 8 |
| 9 @synthesize image = image_; | 9 @synthesize image = image_; |
| 10 @synthesize loading = loading_; | 10 @synthesize loading = loading_; |
| 11 @synthesize target = target_; | 11 @synthesize target = target_; |
| 12 @synthesize action = action_; | 12 @synthesize action = action_; |
| 13 | 13 |
| 14 + (float)minTabWidth { return 64.0; } | 14 + (float)minTabWidth { return 64.0; } |
| 15 + (float)maxTabWidth { return 160.0; } | 15 + (float)maxTabWidth { return 220.0; } |
| 16 | 16 |
| 17 - (TabView*)tabView { | 17 - (TabView*)tabView { |
| 18 return static_cast<TabView*>([self view]); | 18 return static_cast<TabView*>([self view]); |
| 19 } | 19 } |
| 20 | 20 |
| 21 - (id)init { | 21 - (id)init { |
| 22 self = [super initWithNibName:@"TabView" bundle:nil]; | 22 self = [super initWithNibName:@"TabView" bundle:nil]; |
| 23 if (self != nil) { | 23 if (self != nil) { |
| 24 [self setImage:[NSImage imageNamed:@"nav"]]; | 24 [self setImage:[NSImage imageNamed:@"nav"]]; |
| 25 } | 25 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 49 [backgroundButton_ setState:selected]; | 49 [backgroundButton_ setState:selected]; |
| 50 [[self view] setNeedsDisplay:YES]; | 50 [[self view] setNeedsDisplay:YES]; |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 - (BOOL)selected { | 54 - (BOOL)selected { |
| 55 return selected_; | 55 return selected_; |
| 56 } | 56 } |
| 57 | 57 |
| 58 @end | 58 @end |
| OLD | NEW |