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

Side by Side Diff: third_party/WebKit/public/platform/WebThemeEngine.h

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: fix test Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebThemeEngine_h 31 #ifndef WebThemeEngine_h
32 #define WebThemeEngine_h 32 #define WebThemeEngine_h
33 33
34 #include "WebCanvas.h" 34 #include "WebCanvas.h"
35 #include "WebColor.h" 35 #include "WebColor.h"
36 #include "WebScrollbarOverlayColorTheme.h"
36 #include "WebSize.h" 37 #include "WebSize.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 struct WebRect; 41 struct WebRect;
41 42
42 class WebThemeEngine { 43 class WebThemeEngine {
43 public: 44 public:
44 // The current state of the associated Part. 45 // The current state of the associated Part.
45 enum State { 46 enum State {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 131
131 // Extra parameters for PartProgressBar 132 // Extra parameters for PartProgressBar
132 struct ProgressBarExtraParams { 133 struct ProgressBarExtraParams {
133 bool determinate; 134 bool determinate;
134 int valueRectX; 135 int valueRectX;
135 int valueRectY; 136 int valueRectY;
136 int valueRectWidth; 137 int valueRectWidth;
137 int valueRectHeight; 138 int valueRectHeight;
138 }; 139 };
139 140
141 // Extra parameters for scrollbar thumb. Used only for overlay scrollbars.
142 struct ScrollbarThumbExtraParams {
143 WebScrollbarOverlayColorTheme scrollbarTheme;
144 };
145
140 union ExtraParams { 146 union ExtraParams {
141 ScrollbarTrackExtraParams scrollbarTrack; 147 ScrollbarTrackExtraParams scrollbarTrack;
142 ButtonExtraParams button; 148 ButtonExtraParams button;
143 TextFieldExtraParams textField; 149 TextFieldExtraParams textField;
144 MenuListExtraParams menuList; 150 MenuListExtraParams menuList;
145 SliderExtraParams slider; 151 SliderExtraParams slider;
146 InnerSpinButtonExtraParams innerSpin; 152 InnerSpinButtonExtraParams innerSpin;
147 ProgressBarExtraParams progressBar; 153 ProgressBarExtraParams progressBar;
154 ScrollbarThumbExtraParams scrollbarThumb;
148 }; 155 };
149 156
150 // Gets the size of the given theme part. For variable sized items 157 // Gets the size of the given theme part. For variable sized items
151 // like vertical scrollbar thumbs, the width will be the required width of 158 // like vertical scrollbar thumbs, the width will be the required width of
152 // the track while the height will be the minimum height. 159 // the track while the height will be the minimum height.
153 virtual WebSize getSize(Part) { return WebSize(); } 160 virtual WebSize getSize(Part) { return WebSize(); }
154 161
155 struct ScrollbarStyle { 162 struct ScrollbarStyle {
156 int thumbThickness; 163 int thumbThickness;
157 int scrollbarMargin; 164 int scrollbarMargin;
158 WebColor color; 165 WebColor color;
159 }; 166 };
160 167
161 // Gets the overlay scrollbar style. Used for mobile theme. 168 // Gets the overlay scrollbar style. Used for mobile theme.
162 virtual void getOverlayScrollbarStyle(ScrollbarStyle*) {} 169 virtual void getOverlayScrollbarStyle(ScrollbarStyle*) {}
163 170
164 // Paint the given the given theme part. 171 // Paint the given the given theme part.
165 virtual void paint(WebCanvas*, 172 virtual void paint(WebCanvas*,
166 Part, 173 Part,
167 State, 174 State,
168 const WebRect&, 175 const WebRect&,
169 const ExtraParams*) {} 176 const ExtraParams*) {}
170 }; 177 };
171 178
172 } // namespace blink 179 } // namespace blink
173 180
174 #endif 181 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebScrollbarOverlayColorTheme.h ('k') | ui/native_theme/native_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698