| 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 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 | 597 |
| 598 - (SkColor)closeButtonColor { | 598 - (SkColor)closeButtonColor { |
| 599 return [[controller_ closeButton] iconColor]; | 599 return [[controller_ closeButton] iconColor]; |
| 600 } | 600 } |
| 601 | 601 |
| 602 - (void)setState:(NSCellStateValue)state { | 602 - (void)setState:(NSCellStateValue)state { |
| 603 if (state_ == state) | 603 if (state_ == state) |
| 604 return; | 604 return; |
| 605 state_ = state; | 605 state_ = state; |
| 606 [self setNeedsDisplay:YES]; | 606 [self setNeedsDisplay:YES]; |
| 607 [closeButton_ setNeedsDisplay:YES]; |
| 607 } | 608 } |
| 608 | 609 |
| 609 - (void)setClosing:(BOOL)closing { | 610 - (void)setClosing:(BOOL)closing { |
| 610 closing_ = closing; // Safe because the property is nonatomic. | 611 closing_ = closing; // Safe because the property is nonatomic. |
| 611 // When closing, ensure clicks to the close button go nowhere. | 612 // When closing, ensure clicks to the close button go nowhere. |
| 612 if (closing) { | 613 if (closing) { |
| 613 [closeButton_ setTarget:nil]; | 614 [closeButton_ setTarget:nil]; |
| 614 [closeButton_ setAction:nil]; | 615 [closeButton_ setAction:nil]; |
| 615 } | 616 } |
| 616 } | 617 } |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 NSAffineTransform* transform = [NSAffineTransform transform]; | 947 NSAffineTransform* transform = [NSAffineTransform transform]; |
| 947 [transform scaleXBy:-1 yBy:1]; | 948 [transform scaleXBy:-1 yBy:1]; |
| 948 [transform translateXBy:-17.5 yBy:-0.25]; | 949 [transform translateXBy:-17.5 yBy:-0.25]; |
| 949 [bezierPath transformUsingAffineTransform:transform]; | 950 [bezierPath transformUsingAffineTransform:transform]; |
| 950 | 951 |
| 951 [[NSColor whiteColor] set]; | 952 [[NSColor whiteColor] set]; |
| 952 [bezierPath fill]; | 953 [bezierPath fill]; |
| 953 } | 954 } |
| 954 | 955 |
| 955 @end // @implementation TabView(MaterialDesign) | 956 @end // @implementation TabView(MaterialDesign) |
| OLD | NEW |