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

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

Issue 7130001: Make infobar background gray (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: '' Created 9 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 | « chrome/browser/ui/views/infobars/infobar_background.h ('k') | skia/ext/skia_utils_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/infobar_background.cc
===================================================================
--- chrome/browser/ui/views/infobars/infobar_background.cc (revision 88097)
+++ chrome/browser/ui/views/infobars/infobar_background.cc (working copy)
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/views/infobars/infobar_background.h"
+#include "chrome/browser/tab_contents/infobar.h"
#include "chrome/browser/ui/views/infobars/infobar_view.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/canvas_skia_paint.h"
@@ -12,33 +13,13 @@
InfoBarBackground::InfoBarBackground(InfoBarDelegate::Type infobar_type)
: separator_color_(SK_ColorBLACK),
- top_color_(GetTopColor(infobar_type)),
- bottom_color_(GetBottomColor(infobar_type)) {
+ top_color_(GetInfoBarTopColor(infobar_type)),
+ bottom_color_(GetInfoBarBottomColor(infobar_type)) {
}
InfoBarBackground::~InfoBarBackground() {
}
-SkColor InfoBarBackground::GetTopColor(InfoBarDelegate::Type infobar_type) {
- static const SkColor kWarningBackgroundColorTop =
- SkColorSetRGB(255, 242, 183);
- static const SkColor kPageActionBackgroundColorTop =
- SkColorSetRGB(218, 231, 249);
-
- return (infobar_type == InfoBarDelegate::WARNING_TYPE) ?
- kWarningBackgroundColorTop : kPageActionBackgroundColorTop;
-}
-
-SkColor InfoBarBackground::GetBottomColor(InfoBarDelegate::Type infobar_type) {
- static const SkColor kWarningBackgroundColorBottom =
- SkColorSetRGB(250, 230, 145);
- static const SkColor kPageActionBackgroundColorBottom =
- SkColorSetRGB(179, 202, 231);
-
- return (infobar_type == InfoBarDelegate::WARNING_TYPE) ?
- kWarningBackgroundColorBottom : kPageActionBackgroundColorBottom;
-}
-
void InfoBarBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
SkPoint gradient_points[2] = {
{SkIntToScalar(0), SkIntToScalar(0)},
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_background.h ('k') | skia/ext/skia_utils_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698