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

Unified Diff: chrome/browser/tab_contents/infobar.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/tab_contents/infobar.h ('k') | chrome/browser/themes/theme_service_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/infobar.cc
===================================================================
--- chrome/browser/tab_contents/infobar.cc (revision 88097)
+++ chrome/browser/tab_contents/infobar.cc (working copy)
@@ -2,17 +2,40 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#if defined(TOOLKIT_VIEWS) // TODO(pkasting): Port non-views to use this.
-
#include "chrome/browser/tab_contents/infobar.h"
#include <cmath>
#include "base/logging.h"
#include "chrome/browser/tab_contents/infobar_container.h"
-#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "ui/base/animation/slide_animation.h"
+SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type) {
+ // Yellow
+ static const SkColor kWarningBackgroundColorTop =
+ SkColorSetRGB(255, 242, 183);
+ // Gray
+ static const SkColor kPageActionBackgroundColorTop =
+ SkColorSetRGB(237, 237, 237);
+
+ return (infobar_type == InfoBarDelegate::WARNING_TYPE) ?
+ kWarningBackgroundColorTop : kPageActionBackgroundColorTop;
+}
+
+SkColor GetInfoBarBottomColor(InfoBarDelegate::Type infobar_type) {
+ // Yellow
+ static const SkColor kWarningBackgroundColorBottom =
+ SkColorSetRGB(250, 230, 145);
+ // Gray
+ static const SkColor kPageActionBackgroundColorBottom =
+ SkColorSetRGB(217, 217, 217);
+
+ return (infobar_type == InfoBarDelegate::WARNING_TYPE) ?
+ kWarningBackgroundColorBottom : kPageActionBackgroundColorBottom;
+}
+
+#if defined(TOOLKIT_VIEWS) // TODO(pkasting): Port non-views to use this.
+
InfoBar::InfoBar(TabContentsWrapper* owner, InfoBarDelegate* delegate)
: owner_(owner),
delegate_(delegate),
« no previous file with comments | « chrome/browser/tab_contents/infobar.h ('k') | chrome/browser/themes/theme_service_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698