| 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 #ifndef CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 | 9 |
| 10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
| 11 | 11 |
| 12 // Draws a vertical background gradient with a bottom stroke. The gradient and | 12 // Draws a vertical background gradient with a bottom stroke. The gradient and |
| 13 // stroke colors can be defined by calling |setGradient| and |setStrokeColor|, | 13 // stroke colors can be defined by calling |setGradient| and |setStrokeColor|, |
| 14 // respectively. Alternatively, you may override the |gradient| and | 14 // respectively. Alternatively, you may override the |gradient| and |
| 15 // |strokeColor| accessors in order to provide colors dynamically. If the | 15 // |strokeColor| accessors in order to provide colors dynamically. If the |
| 16 // gradient or color is |nil|, the respective element will not be drawn. | 16 // gradient or color is |nil|, the respective element will not be drawn. |
| 17 @interface VerticalGradientView : NSView { | 17 @interface VerticalGradientView : NSView { |
| 18 @private | 18 @private |
| 19 // The gradient to draw. | 19 // The gradient to draw. |
| 20 scoped_nsobject<NSGradient> gradient_; | 20 base::scoped_nsobject<NSGradient> gradient_; |
| 21 // Color for bottom stroke. | 21 // Color for bottom stroke. |
| 22 scoped_nsobject<NSColor> strokeColor_; | 22 base::scoped_nsobject<NSColor> strokeColor_; |
| 23 } | 23 } |
| 24 | 24 |
| 25 // Gets and sets the gradient to paint as background. | 25 // Gets and sets the gradient to paint as background. |
| 26 - (NSGradient*)gradient; | 26 - (NSGradient*)gradient; |
| 27 - (void)setGradient:(NSGradient*)gradient; | 27 - (void)setGradient:(NSGradient*)gradient; |
| 28 | 28 |
| 29 // Gets and sets the color of the stroke drawn at the bottom of the view. | 29 // Gets and sets the color of the stroke drawn at the bottom of the view. |
| 30 - (NSColor*)strokeColor; | 30 - (NSColor*)strokeColor; |
| 31 - (void)setStrokeColor:(NSColor*)gradient; | 31 - (void)setStrokeColor:(NSColor*)gradient; |
| 32 | 32 |
| 33 @end | 33 @end |
| 34 | 34 |
| 35 #endif // CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ | 35 #endif // CHROME_BROWSER_UI_COCOA_VERTICAL_GRADIENT_VIEW_H_ |
| OLD | NEW |