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

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

Issue 2336463002: Make the edge where BackgroundGradientView draws a divider selectable. (Closed)
Patch Set: Created 4 years, 3 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
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 #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 enum class BackgroundGradientViewDivider {
Nico 2016/09/12 13:45:55 why enum class? can we come up with something shor
Sidney San Martín 2016/09/14 17:46:59 I'd rather shove one name into the global namespac
13 Bottom,
14 Top,
15 };
16
12 // A custom view that draws a 'standard' background gradient. 17 // A custom view that draws a 'standard' background gradient.
13 // Base class for other Chromium views. 18 // Base class for other Chromium views.
14 @interface BackgroundGradientView : NSView<ThemedWindowDrawing> { 19 @interface BackgroundGradientView : NSView<ThemedWindowDrawing>
15 @private
16 BOOL showsDivider_;
17 }
18 20
19 // Controls whether the bar draws a dividing line at the bottom. 21 // Controls where and if the bar draws a dividing line.
22 @property(nonatomic, assign) BackgroundGradientViewDivider divider;
20 @property(nonatomic, assign) BOOL showsDivider; 23 @property(nonatomic, assign) BOOL showsDivider;
21 24
22 // The color used for the bottom stroke. Public so subclasses can use. 25 // The color used for the bottom stroke. Public so subclasses can use.
23 - (NSColor*)strokeColor; 26 - (NSColor*)strokeColor;
24 27
25 // The pattern phase that will be used by -drawRect:. 28 // The pattern phase that will be used by -drawRect:.
26 // Defaults to align the top of the theme image with the top of the tabs. 29 // 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 30 // Views that draw at the bottom of the window (download bar) can override to
28 // change the pattern phase. 31 // change the pattern phase.
29 - (NSPoint)patternPhase; 32 - (NSPoint)patternPhase;
30 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698