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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_
6 #define CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_
8 #import <Cocoa/Cocoa.h>
10 #import "chrome/browser/ui/cocoa/themed_window.h"
12 // A custom view that draws a 'standard' background gradient.
13 // Base class for other Chromium views.
14 @interface BackgroundGradientView
: NSView
<ThemedWindowDrawing
> {
19 // Controls whether the bar draws a dividing line at the bottom.
20 @
property(nonatomic
, assign
) BOOL showsDivider
;
22 // The color used for the bottom stroke. Public so subclasses can use.
23 - (NSColor
*)strokeColor
;
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.
27 // Views that draw at the bottom of the window (download bar) can override to
28 // change the pattern phase.
29 - (NSPoint
)patternPhase
;
31 // Draws the background image into the current NSGraphicsContext.
32 - (void)drawBackground
:(NSRect
)dirtyRect
;
36 #endif // CHROME_BROWSER_UI_COCOA_BACKGROUND_GRADIENT_VIEW_H_