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

Unified Diff: chrome/browser/ui/views/infobars/infobar_background.cc

Issue 10911169: Setup field trial for one-click signin inforbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Steve's review comments Created 8 years, 3 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: chrome/browser/ui/views/infobars/infobar_background.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_background.cc b/chrome/browser/ui/views/infobars/infobar_background.cc
index 91445789fbddf415559f7d613079ba4c387156f8..4300aa703b5ca77a7de3d3987b9f921fbdccaa94 100644
--- a/chrome/browser/ui/views/infobars/infobar_background.cc
+++ b/chrome/browser/ui/views/infobars/infobar_background.cc
@@ -15,13 +15,22 @@ InfoBarBackground::InfoBarBackground(InfoBarDelegate::Type infobar_type)
: separator_color_(SK_ColorBLACK),
top_color_(GetInfoBarTopColor(infobar_type)),
bottom_color_(GetInfoBarBottomColor(infobar_type)) {
- SetNativeControlColor(
- color_utils::AlphaBlend(top_color_, bottom_color_, 128));
+ Init();
+}
+
+InfoBarBackground::InfoBarBackground(SkColor top, SkColor bottom)
+ : separator_color_(SK_ColorBLACK), top_color_(top), bottom_color_(bottom) {
+ Init();
}
InfoBarBackground::~InfoBarBackground() {
}
+void InfoBarBackground::Init() {
+ SetNativeControlColor(
+ color_utils::AlphaBlend(top_color_, bottom_color_, 128));
+}
+
void InfoBarBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
SkPoint gradient_points[2];
gradient_points[0].iset(0, 0);

Powered by Google App Engine
This is Rietveld 408576698