Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: chrome/browser/ui/cocoa/hover_close_button.h

Issue 7331042: fix for 27454 - Fade out close button state on mouse exit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix up rsesek nits Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/hover_button.mm ('k') | chrome/browser/ui/cocoa/hover_close_button.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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
30 // via initWithFrame or awakeFromNib.
31 - (void)commonInit;
32
33 @end 21 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/hover_button.mm ('k') | chrome/browser/ui/cocoa/hover_close_button.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698