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); |