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

Side by Side Diff: ui/native_theme/native_theme.h

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: fix 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_NATIVE_THEME_NATIVE_THEME_H_ 5 #ifndef UI_NATIVE_THEME_NATIVE_THEME_H_
6 #define UI_NATIVE_THEME_NATIVE_THEME_H_ 6 #define UI_NATIVE_THEME_NATIVE_THEME_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 struct ScrollbarTrackExtraParams { 165 struct ScrollbarTrackExtraParams {
166 bool is_upper; 166 bool is_upper;
167 int track_x; 167 int track_x;
168 int track_y; 168 int track_y;
169 int track_width; 169 int track_width;
170 int track_height; 170 int track_height;
171 int classic_state; // Used on Windows when uxtheme is not available. 171 int classic_state; // Used on Windows when uxtheme is not available.
172 }; 172 };
173 173
174 enum ScrollbarOverlayColorTheme {
175 ScrollbarOverlayColorThemeDefault,
176 ScrollbarOverlayColorThemeDark,
177 ScrollbarOverlayColorThemeLight
178 };
179
174 struct ScrollbarThumbExtraParams { 180 struct ScrollbarThumbExtraParams {
175 bool is_hovering; 181 bool is_hovering;
182 ScrollbarOverlayColorTheme scrollbar_theme;
176 }; 183 };
177 184
178 struct SliderExtraParams { 185 struct SliderExtraParams {
179 bool vertical; 186 bool vertical;
180 bool in_drag; 187 bool in_drag;
181 }; 188 };
182 189
183 struct TextFieldExtraParams { 190 struct TextFieldExtraParams {
184 bool is_text_area; 191 bool is_text_area;
185 bool is_listbox; 192 bool is_listbox;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const gfx::Rect& rect, 235 const gfx::Rect& rect,
229 const ExtraParams& extra) const = 0; 236 const ExtraParams& extra) const = 0;
230 237
231 // Paint part during state transition, used for overlay scrollbar state 238 // Paint part during state transition, used for overlay scrollbar state
232 // transition animation. 239 // transition animation.
233 virtual void PaintStateTransition(SkCanvas* canvas, 240 virtual void PaintStateTransition(SkCanvas* canvas,
234 Part part, 241 Part part,
235 State startState, 242 State startState,
236 State endState, 243 State endState,
237 double progress, 244 double progress,
238 const gfx::Rect& rect) const { } 245 const gfx::Rect& rect,
246 ScrollbarOverlayColorTheme theme) const {}
239 247
240 // Supports theme specific colors. 248 // Supports theme specific colors.
241 void SetScrollbarColors(unsigned inactive_color, 249 void SetScrollbarColors(unsigned inactive_color,
242 unsigned active_color, 250 unsigned active_color,
243 unsigned track_color); 251 unsigned track_color);
244 252
245 // Colors for GetSystemColor(). 253 // Colors for GetSystemColor().
246 enum ColorId { 254 enum ColorId {
247 // Windows 255 // Windows
248 kColorId_WindowBackground, 256 kColorId_WindowBackground,
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 private: 382 private:
375 // Observers to notify when the native theme changes. 383 // Observers to notify when the native theme changes.
376 base::ObserverList<NativeThemeObserver> native_theme_observers_; 384 base::ObserverList<NativeThemeObserver> native_theme_observers_;
377 385
378 DISALLOW_COPY_AND_ASSIGN(NativeTheme); 386 DISALLOW_COPY_AND_ASSIGN(NativeTheme);
379 }; 387 };
380 388
381 } // namespace ui 389 } // namespace ui
382 390
383 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_ 391 #endif // UI_NATIVE_THEME_NATIVE_THEME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698