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

Unified Diff: ui/native_theme/native_theme_base.cc

Issue 238723004: Paint state transition for overlay 9 patch scrollbars (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « 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 a2ba3a495a9de28681c495a5fe0408592aa32fa8..53a5441e83f0469f9d3ec81d3915f632eb23ae25 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -156,6 +156,31 @@ 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 {
+ if (rect.IsEmpty())
+ return;
+
+ // Currently state transition is animation only working for overlay scrollbars
+ // on Aura platforms.
+ switch (part) {
+ case kScrollbarHorizontalThumb:
+ case kScrollbarVerticalThumb:
+ PaintScrollbarThumbStateTransition(
+ canvas, startState, endState, progress, rect);
+ break;
+ default:
+ NOTREACHED() << "Does not support state transition for this part:"
+ << part;
+ break;
+ }
+ return;
+}
+
void NativeThemeBase::Paint(SkCanvas* canvas,
Part part,
State state,
« no previous file with comments | « 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