| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <Cocoa/Cocoa.h> | 5 #include "chrome/browser/ui/cocoa/hover_button.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/memory/scoped_nsobject.h" |
| 8 #include "chrome/browser/ui/cocoa/hover_button.h" | 8 |
| 9 @class CALayer; |
| 9 | 10 |
| 10 // The standard close button for our Mac UI which is the "x" that changes to a | 11 // The standard close button for our Mac UI which is the "x" that changes to a |
| 11 // dark circle with the "x" when you hover over it. At this time it is used by | 12 // dark circle with the "x" when you hover over it. At this time it is used by |
| 12 // the popup blocker, download bar, info bar and tabs. | 13 // the popup blocker, download bar, info bar and tabs. |
| 13 @interface HoverCloseButton : HoverButton { | 14 @interface HoverCloseButton : HoverButton { |
| 14 @private | 15 @private |
| 15 // Bezier path for drawing the 'x' within the button. | 16 scoped_nsobject<CALayer> hoverNoneLayer_; |
| 16 scoped_nsobject<NSBezierPath> xPath_; | 17 scoped_nsobject<CALayer> hoverMouseOverLayer_; |
| 17 | 18 scoped_nsobject<CALayer> hoverMouseDownLayer_; |
| 18 // Bezier path for drawing the hover state circle behind the 'x'. | |
| 19 scoped_nsobject<NSBezierPath> circlePath_; | |
| 20 | |
| 21 // Translation of the 'x' button to the middle vertically. | |
| 22 scoped_nsobject<NSAffineTransform> transform_; | |
| 23 | |
| 24 // The size of the control when the last drawRect: was called, to recenter | |
| 25 // the paths above if it changed. | |
| 26 NSSize oldSize_; | |
| 27 } | 19 } |
| 28 | 20 |
| 29 // Sets up the button's tracking areas and accessibility info when instantiated | 21 |
| 30 // via initWithFrame or awakeFromNib. | |
| 31 - (void)commonInit; | |
| 32 | 22 |
| 33 @end | 23 @end |
| OLD | NEW |