| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_view.h" | 5 #import "chrome/browser/ui/cocoa/tab_view.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "base/mac_util.h" | 8 #import "base/mac_util.h" |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/nsimage_cache_mac.h" | 10 #include "base/nsimage_cache_mac.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 - (void)awakeFromNib { | 75 - (void)awakeFromNib { |
| 76 [self setShowsDivider:NO]; | 76 [self setShowsDivider:NO]; |
| 77 | 77 |
| 78 // It is desirable for us to remove the close button from the cocoa hierarchy, | 78 // It is desirable for us to remove the close button from the cocoa hierarchy, |
| 79 // so that VoiceOver does not encounter it. | 79 // so that VoiceOver does not encounter it. |
| 80 // TODO(dtseng): crbug.com/59978. | 80 // TODO(dtseng): crbug.com/59978. |
| 81 // Retain in case we remove it from its superview. | 81 // Retain in case we remove it from its superview. |
| 82 closeButtonRetainer_.reset([closeButton_ retain]); | 82 closeButtonRetainer_.reset([closeButton_ retain]); |
| 83 if (Singleton<BrowserAccessibilityState>::get()->IsAccessibleBrowser()) { | 83 if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) { |
| 84 // The superview gives up ownership of the closeButton here. | 84 // The superview gives up ownership of the closeButton here. |
| 85 [closeButton_ removeFromSuperview]; | 85 [closeButton_ removeFromSuperview]; |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 - (void)dealloc { | 89 - (void)dealloc { |
| 90 // Cancel any delayed requests that may still be pending (drags or hover). | 90 // Cancel any delayed requests that may still be pending (drags or hover). |
| 91 [NSObject cancelPreviousPerformRequestsWithTarget:self]; | 91 [NSObject cancelPreviousPerformRequestsWithTarget:self]; |
| 92 [super dealloc]; | 92 [super dealloc]; |
| 93 } | 93 } |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset, | 1048 controlPoint1:NSMakePoint(topRight.x + bottomControlPointInset, |
| 1049 topRight.y) | 1049 topRight.y) |
| 1050 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset, | 1050 controlPoint2:NSMakePoint(bottomRight.x - baseControlPointOutset, |
| 1051 bottomRight.y)]; | 1051 bottomRight.y)]; |
| 1052 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)]; | 1052 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y)]; |
| 1053 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)]; | 1053 [path lineToPoint:NSMakePoint(bottomRight.x + 1, bottomRight.y - 2)]; |
| 1054 return path; | 1054 return path; |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 @end // @implementation TabView(Private) | 1057 @end // @implementation TabView(Private) |
| OLD | NEW |