summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 20:02:44 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 20:02:44 +0000
commit0b9158f07ac7c5ed1dc1c166e4a1513d6fbbb9e9 (patch)
treed9be84b80b923447d8865b181d902185dab034e9
parent56d83182c6d4c815aab837e82ccccc6103bc4b6a (diff)
downloadchromium_src-0b9158f07ac7c5ed1dc1c166e4a1513d6fbbb9e9.zip
chromium_src-0b9158f07ac7c5ed1dc1c166e4a1513d6fbbb9e9.tar.gz
chromium_src-0b9158f07ac7c5ed1dc1c166e4a1513d6fbbb9e9.tar.bz2
Use system background color for info bubbles. This causes some problems right now due to bug 21027 and bug 21028.
BUG=92 TEST=Go to a secure site, hover the lock and see that the bubble uses the system window background color. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25497 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/views/info_bubble.cc7
-rw-r--r--chrome/browser/views/location_bar_view.cc9
2 files changed, 7 insertions, 9 deletions
diff --git a/chrome/browser/views/info_bubble.cc b/chrome/browser/views/info_bubble.cc
index a235de3..4cd95cb 100644
--- a/chrome/browser/views/info_bubble.cc
+++ b/chrome/browser/views/info_bubble.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/views/info_bubble.h"
#include "app/gfx/canvas.h"
+#include "app/gfx/color_utils.h"
#include "app/gfx/path.h"
#include "app/resource_bundle.h"
#include "chrome/browser/browser_window.h"
@@ -38,7 +39,13 @@ static const int kArrowXOffset = 13;
static const int kArrowToContentPadding = -4;
// Background color of the bubble.
+#if defined(OS_WIN)
+static const SkColor kBackgroundColor =
+ color_utils::GetSysSkColor(COLOR_WINDOW);
+#else
+// TODO(beng): source from theme provider.
static const SkColor kBackgroundColor = SK_ColorWHITE;
+#endif
// Color of the border and arrow.
static const SkColor kBorderColor1 = SkColorSetRGB(99, 99, 99);
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index a41b040..efe3cef 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -248,7 +248,6 @@ SkColor LocationBarView::GetColor(bool is_secure, ColorKind kind) {
kLightNotSecureText,
colors[NOT_SECURE][BACKGROUND]);
colors[SECURE][SECURITY_TEXT] = SkColorSetRGB(0, 150, 20);
-#if 0 // Info bubble background color is system theme window background color
colors[NOT_SECURE][SECURITY_INFO_BUBBLE_TEXT] =
colors[NOT_SECURE][SECURITY_TEXT];
const SkColor kDarkSecureInfoBubbleText = SkColorSetRGB(0, 153, 51);
@@ -257,10 +256,6 @@ SkColor LocationBarView::GetColor(bool is_secure, ColorKind kind) {
color_utils::PickMoreReadableColor(kDarkSecureInfoBubbleText,
kLightSecureInfoBubbleText,
colors[NOT_SECURE][BACKGROUND]);
-#else // Info bubble background color is white
- colors[NOT_SECURE][SECURITY_INFO_BUBBLE_TEXT] = kDarkNotSecureText;
- colors[SECURE][SECURITY_INFO_BUBBLE_TEXT] = SkColorSetRGB(0, 153, 51);
-#endif
const SkColor kDarkSchemeStrikeout = SkColorSetRGB(210, 0, 0);
const SkColor kLightSchemeStrikeout = SkColorSetRGB(255, 45, 45);
colors[NOT_SECURE][SCHEME_STRIKEOUT] =
@@ -1371,11 +1366,7 @@ bool LocationBarView::PageActionImageView::OnMousePressed(
}
void LocationBarView::PageActionImageView::ShowInfoBubble() {
-#if 0 // Info bubble background color is system theme window background color
ShowInfoBubbleImpl(ASCIIToWide(tooltip_), GetColor(false, TEXT));
-#else // Info bubble background color is white
- ShowInfoBubbleImpl(ASCIIToWide(tooltip_), SK_ColorBLACK);
-#endif
}
void LocationBarView::PageActionImageView::UpdateVisibility(