summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/location_bar_view.cc
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 03:06:28 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-25 03:06:28 +0000
commitd4cafafac04f16475b30346609c21dca6a8906d0 (patch)
tree222c3ead2eb74d7120be8b08356996003bf53b8d /chrome/browser/views/location_bar_view.cc
parente9aac796f9c73762f82b79cdb49682383058b054 (diff)
downloadchromium_src-d4cafafac04f16475b30346609c21dca6a8906d0.zip
chromium_src-d4cafafac04f16475b30346609c21dca6a8906d0.tar.gz
chromium_src-d4cafafac04f16475b30346609c21dca6a8906d0.tar.bz2
Show EV cert info text next to security icon.
Use hbox to pack location entry, security icons and EV cert info text. Change ToolbarModel::GetInfoText not return SkColor. BUG=none TEST=none Review URL: http://codereview.chromium.org/126117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.cc')
-rw-r--r--chrome/browser/views/location_bar_view.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc
index 59fbe37..7530dee 100644
--- a/chrome/browser/views/location_bar_view.cc
+++ b/chrome/browser/views/location_bar_view.cc
@@ -4,12 +4,12 @@
#include "chrome/browser/views/location_bar_view.h"
-#include "build/build_config.h"
-
#if defined(OS_LINUX)
#include <gtk/gtk.h>
#endif
+#include "build/build_config.h"
+
#include "app/gfx/canvas.h"
#include "app/gfx/favicon_size.h"
#include "app/l10n_util.h"
@@ -228,9 +228,9 @@ void LocationBarView::Update(const TabContents* tab_for_state_restoring) {
SetSecurityIcon(model_->GetIcon());
RefreshPageActionViews();
std::wstring info_text, info_tooltip;
- SkColor text_color;
- model_->GetInfoText(&info_text, &text_color, &info_tooltip);
- SetInfoText(info_text, text_color, info_tooltip);
+ ToolbarModel::InfoTextType info_text_type =
+ model_->GetInfoText(&info_text, &info_tooltip);
+ SetInfoText(info_text, info_text_type, info_tooltip);
location_entry_->Update(tab_for_state_restoring);
Layout();
SchedulePaint();
@@ -649,11 +649,12 @@ void LocationBarView::RefreshPageActionViews() {
}
void LocationBarView::SetInfoText(const std::wstring& text,
- SkColor text_color,
+ ToolbarModel::InfoTextType text_type,
const std::wstring& tooltip_text) {
info_label_.SetVisible(!text.empty());
info_label_.SetText(text);
- info_label_.SetColor(text_color);
+ if (text_type == ToolbarModel::INFO_EV_TEXT)
+ info_label_.SetColor(SkColorSetRGB(0, 150, 20)); // Green.
info_label_.SetTooltipText(tooltip_text);
}