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

Unified Diff: ui/views/background.h

Issue 1394763003: Update LocationBarView Background (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor Painting into a Background class Created 5 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
Index: ui/views/background.h
diff --git a/ui/views/background.h b/ui/views/background.h
index 8ecca6e285be1b53291a0ba78952842d1ce199c9..76e6af4833912396971c1eb2673ec81285e432d6 100644
--- a/ui/views/background.h
+++ b/ui/views/background.h
@@ -54,6 +54,14 @@ class VIEWS_EXPORT Background {
return CreateSolidBackground(SkColorSetARGB(a, r, g, b));
}
+ // Creates a background that paints a rectangle with color |background|. This
+ // will also paint a one pixel border around the rectangle of color |border|,
+ // accounting for the scaling of the canvas. If |round| the rectangle will
+ // have rounded corners.
+ static Background* CreateSolidScaledBackground(SkColor background,
Peter Kasting 2015/10/19 21:09:44 Why put this here? Are you going to be using it o
Evan Stade 2015/10/19 23:21:30 The plan is to use it for chips as well (e.g. ev_b
Peter Kasting 2015/10/19 23:32:23 Ah, helpful. Yeah, I would probably avoid touchin
jonross 2015/10/20 18:54:54 Evan was going to use this for the omnibox chips
+ SkColor border,
+ bool round);
+
// Creates a background that contains a vertical gradient that varies
// from |color1| to |color2|
static Background* CreateVerticalGradientBackground(SkColor color1,

Powered by Google App Engine
This is Rietveld 408576698