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

Unified Diff: ui/native_theme/native_theme_base.cc

Issue 2426793002: Aura overlay scrollbars adjust color for dark backgrounds (Closed)
Patch Set: remove deadcode(WebThemeEngineImpl::paintStateTransition), remove ScrollbarOverlayColorThemeDefault Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« ui/native_theme/native_theme_aura.h ('K') | « ui/native_theme/native_theme_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_base.cc
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index 331ceb46be0a5bfe58551fccd79bd72ee21cbf3f..7d304c84cafcce01b17d28316588cc8086000ffa 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -156,12 +156,14 @@ gfx::Size NativeThemeBase::GetPartSize(Part part,
return gfx::Size();
}
-void NativeThemeBase::PaintStateTransition(SkCanvas* canvas,
- Part part,
- State startState,
- State endState,
- double progress,
- const gfx::Rect& rect) const {
+void NativeThemeBase::PaintStateTransition(
+ SkCanvas* canvas,
+ Part part,
+ State startState,
+ State endState,
+ double progress,
+ const gfx::Rect& rect,
+ ScrollbarOverlayColorTheme theme) const {
if (rect.IsEmpty())
return;
@@ -171,7 +173,7 @@ void NativeThemeBase::PaintStateTransition(SkCanvas* canvas,
case kScrollbarHorizontalThumb:
case kScrollbarVerticalThumb:
PaintScrollbarThumbStateTransition(canvas, part, startState, endState,
- progress, rect);
+ progress, rect, theme);
break;
default:
NOTREACHED() << "Does not support state transition for this part:"
@@ -227,7 +229,8 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
break;
case kScrollbarHorizontalThumb:
case kScrollbarVerticalThumb:
- PaintScrollbarThumb(canvas, part, state, rect);
+ PaintScrollbarThumb(canvas, part, state, rect,
+ extra.scrollbar_thumb.scrollbar_theme);
break;
case kScrollbarHorizontalTrack:
case kScrollbarVerticalTrack:
@@ -434,9 +437,10 @@ void NativeThemeBase::PaintScrollbarTrack(SkCanvas* canvas,
}
void NativeThemeBase::PaintScrollbarThumb(SkCanvas* canvas,
- Part part,
- State state,
- const gfx::Rect& rect) const {
+ Part part,
+ State state,
+ const gfx::Rect& rect,
+ ScrollbarOverlayColorTheme) const {
const bool hovered = state == kHovered;
const int midx = rect.x() + rect.width() / 2;
const int midy = rect.y() + rect.height() / 2;
« ui/native_theme/native_theme_aura.h ('K') | « ui/native_theme/native_theme_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698