| 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_view.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/mac/sdk_forward_declarations.h" | 9 #include "base/mac/sdk_forward_declarations.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 | 596 |
| 597 - (SkColor)closeButtonColor { | 597 - (SkColor)closeButtonColor { |
| 598 return [[controller_ closeButton] iconColor]; | 598 return [[controller_ closeButton] iconColor]; |
| 599 } | 599 } |
| 600 | 600 |
| 601 - (void)setState:(NSCellStateValue)state { | 601 - (void)setState:(NSCellStateValue)state { |
| 602 if (state_ == state) | 602 if (state_ == state) |
| 603 return; | 603 return; |
| 604 state_ = state; | 604 state_ = state; |
| 605 [self setNeedsDisplay:YES]; | 605 [self setNeedsDisplay:YES]; |
| 606 [closeButton_ setNeedsDisplay:YES]; |
| 606 } | 607 } |
| 607 | 608 |
| 608 - (void)setClosing:(BOOL)closing { | 609 - (void)setClosing:(BOOL)closing { |
| 609 closing_ = closing; // Safe because the property is nonatomic. | 610 closing_ = closing; // Safe because the property is nonatomic. |
| 610 // When closing, ensure clicks to the close button go nowhere. | 611 // When closing, ensure clicks to the close button go nowhere. |
| 611 if (closing) { | 612 if (closing) { |
| 612 [closeButton_ setTarget:nil]; | 613 [closeButton_ setTarget:nil]; |
| 613 [closeButton_ setAction:nil]; | 614 [closeButton_ setAction:nil]; |
| 614 } | 615 } |
| 615 } | 616 } |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 NSAffineTransform* transform = [NSAffineTransform transform]; | 946 NSAffineTransform* transform = [NSAffineTransform transform]; |
| 946 [transform scaleXBy:-1 yBy:1]; | 947 [transform scaleXBy:-1 yBy:1]; |
| 947 [transform translateXBy:-17.5 yBy:-0.25]; | 948 [transform translateXBy:-17.5 yBy:-0.25]; |
| 948 [bezierPath transformUsingAffineTransform:transform]; | 949 [bezierPath transformUsingAffineTransform:transform]; |
| 949 | 950 |
| 950 [[NSColor whiteColor] set]; | 951 [[NSColor whiteColor] set]; |
| 951 [bezierPath fill]; | 952 [bezierPath fill]; |
| 952 } | 953 } |
| 953 | 954 |
| 954 @end // @implementation TabView(MaterialDesign) | 955 @end // @implementation TabView(MaterialDesign) |
| OLD | NEW |