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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Addressed sadrul@'s feedback Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
index a7a5f702f1c91f91158936d7ad438c222d25741b..7460d9ebbdf7ffe74b6f887d52a746ba1b9911a2 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollbarTheme.h
@@ -185,6 +185,24 @@ class PLATFORM_EXPORT ScrollbarTheme {
virtual bool isMockTheme() const { return false; }
+ virtual bool usesNinePatchThumbResource() const { return false; }
+
+ // For a nine-patch scrollbar, this defines the painting canvas size which the
+ // painting code will use to paint the scrollbar into. The actual scrollbar
+ // dimensions will be ignored for purposes of painting since the resource can
+ // be then resized without a repaint.
+ virtual IntSize ninePatchThumbCanvasSize(const ScrollbarThemeClient&) const {
+ NOTREACHED();
+ return IntSize();
+ }
+
+ // For a nine-patch resource, the aperture defines the center patch that will
+ // be stretched out.
+ virtual IntRect ninePatchThumbAperture(const ScrollbarThemeClient&) const {
+ NOTREACHED();
+ return IntRect();
+ }
+
static ScrollbarTheme& theme();
static void setMockScrollbarsEnabled(bool flag);

Powered by Google App Engine
This is Rietveld 408576698