| 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_BACKGROUND_GRADIENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #import "chrome/browser/ui/cocoa/themed_window.h" | 10 #import "chrome/browser/ui/cocoa/themed_window.h" |
| 11 | 11 |
| 12 // A custom view that draws a 'standard' background gradient. | 12 // A custom view that draws a 'standard' background gradient. |
| 13 // Base class for other Chromium views. | 13 // Base class for other Chromium views. |
| 14 @interface BackgroundGradientView : NSView<ThemedWindowDrawing> { | 14 @interface BackgroundGradientView : NSView<ThemedWindowDrawing> { |
| 15 @private | 15 @private |
| 16 BOOL showsDivider_; | 16 BOOL showsDivider_; |
| 17 } | 17 } |
| 18 | 18 |
| 19 // Controls whether the bar draws a dividing line at the bottom. | 19 // Controls whether the bar draws a dividing line at the bottom. |
| 20 @property(nonatomic, assign) BOOL showsDivider; | 20 @property(nonatomic, assign) BOOL showsDivider; |
| 21 | 21 |
| 22 // The color used for the bottom stroke. Public so subclasses can use. | 22 // The color used for the bottom stroke. Public so subclasses can use. |
| 23 - (NSColor*)strokeColor; | 23 - (NSColor*)strokeColor; |
| 24 | 24 |
| 25 // The pattern phase that will be used by -drawRect:. | 25 // The pattern phase that will be used by -drawBackground:. |
| 26 // Defaults to align the top of the theme image with the top of the tabs. | 26 // Defaults to align the top of the theme image with the top of the tabs. |
| 27 // Views that draw at the bottom of the window (download bar) can override to | 27 // Views that draw at the bottom of the window (download bar) can override to |
| 28 // change the pattern phase. | 28 // change the pattern phase. |
| 29 - (NSPoint)patternPhase; | 29 - (NSPoint)patternPhase; |
| 30 | 30 |
| 31 // Draws the background image into the current NSGraphicsContext. |
| 32 - (void)drawBackground:(NSRect)dirtyRect; |
| 33 |
| 31 @end | 34 @end |
| 32 | 35 |
| 33 #endif // CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ | 36 #endif // CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_ |
| OLD | NEW |