| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/cocoa/tabs/tab_controller.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_controller.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 id<TabControllerTarget> target_; // weak | 60 id<TabControllerTarget> target_; // weak |
| 61 TabController* owner_; // weak, owns me | 61 TabController* owner_; // weak, owns me |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // TabControllerInternal namespace | 64 } // TabControllerInternal namespace |
| 65 | 65 |
| 66 // The min widths is the smallest number at which the right edge of the right | 66 // The min widths is the smallest number at which the right edge of the right |
| 67 // tab border image is not visibly clipped. It is a bit smaller than the sum | 67 // tab border image is not visibly clipped. It is a bit smaller than the sum |
| 68 // of the two tab edge bitmaps because these bitmaps have a few transparent | 68 // of the two tab edge bitmaps because these bitmaps have a few transparent |
| 69 // pixels on the side. The selected tab width includes the close button width. | 69 // pixels on the side. The selected tab width includes the close button width. |
| 70 + (CGFloat)minTabWidth { return 35; } | 70 + (CGFloat)minTabWidth { return 36; } |
| 71 + (CGFloat)minSelectedTabWidth { return 52; } | 71 + (CGFloat)minSelectedTabWidth { return 52; } |
| 72 + (CGFloat)maxTabWidth { return 214; } | 72 + (CGFloat)maxTabWidth { return 214; } |
| 73 + (CGFloat)miniTabWidth { return 58; } | 73 + (CGFloat)miniTabWidth { return 58; } |
| 74 + (CGFloat)appTabWidth { return 66; } | 74 + (CGFloat)appTabWidth { return 66; } |
| 75 | 75 |
| 76 - (TabView*)tabView { | 76 - (TabView*)tabView { |
| 77 DCHECK([[self view] isKindOfClass:[TabView class]]); | 77 DCHECK([[self view] isKindOfClass:[TabView class]]); |
| 78 return static_cast<TabView*>([self view]); | 78 return static_cast<TabView*>([self view]); |
| 79 } | 79 } |
| 80 | 80 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // TabStripDragController. | 384 // TabStripDragController. |
| 385 - (BOOL)tabCanBeDragged:(TabController*)controller { | 385 - (BOOL)tabCanBeDragged:(TabController*)controller { |
| 386 return [[target_ dragController] tabCanBeDragged:controller]; | 386 return [[target_ dragController] tabCanBeDragged:controller]; |
| 387 } | 387 } |
| 388 | 388 |
| 389 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { | 389 - (void)maybeStartDrag:(NSEvent*)event forTab:(TabController*)tab { |
| 390 [[target_ dragController] maybeStartDrag:event forTab:tab]; | 390 [[target_ dragController] maybeStartDrag:event forTab:tab]; |
| 391 } | 391 } |
| 392 | 392 |
| 393 @end | 393 @end |
| OLD | NEW |