| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ | 5 #ifndef CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ |
| 6 #define CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ | 6 #define CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/scoped_nsobject.h" | 10 #include "base/scoped_nsobject.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 }; | 23 }; |
| 24 typedef NSInteger ButtonType; | 24 typedef NSInteger ButtonType; |
| 25 | 25 |
| 26 @interface GradientButtonCell : NSButtonCell { | 26 @interface GradientButtonCell : NSButtonCell { |
| 27 @private | 27 @private |
| 28 // Custom drawing means we need to perform our own mouse tracking if | 28 // Custom drawing means we need to perform our own mouse tracking if |
| 29 // the cell is setShowsBorderOnlyWhileMouseInside:YES. | 29 // the cell is setShowsBorderOnlyWhileMouseInside:YES. |
| 30 BOOL isMouseInside_; | 30 BOOL isMouseInside_; |
| 31 scoped_nsobject<NSTrackingArea> trackingArea_; | 31 scoped_nsobject<NSTrackingArea> trackingArea_; |
| 32 BOOL shouldTheme_; | 32 BOOL shouldTheme_; |
| 33 |
| 34 scoped_nsobject<NSImage> underlayImage_; |
| 33 } | 35 } |
| 36 |
| 34 // Turn off theming. Temporary work-around. | 37 // Turn off theming. Temporary work-around. |
| 35 - (void)setShouldTheme:(BOOL)shouldTheme; | 38 - (void)setShouldTheme:(BOOL)shouldTheme; |
| 39 |
| 40 // An image to underlay beneath the existing image; not themed. May be nil. |
| 41 - (NSImage*)underlayImage; |
| 42 - (void)setUnderlayImage:(NSImage*)image; |
| 43 |
| 36 @end | 44 @end |
| 37 | 45 |
| 38 @interface GradientButtonCell(TestingAPI) | 46 @interface GradientButtonCell(TestingAPI) |
| 39 - (BOOL)isMouseInside; | 47 - (BOOL)isMouseInside; |
| 40 @end | 48 @end |
| 41 | 49 |
| 42 #endif // CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ | 50 #endif // CHROME_BROWSER_COCOA_CHROMIUM_BUTTON_CELL_H_ |
| OLD | NEW |