summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/page_info_window_view.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 22:51:54 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-30 22:51:54 +0000
commitb232fc0b33f3c21a90918be4b646ccef388c9e63 (patch)
tree78f53df2e06f8873cc6a5ad80a23e5ff2c981428 /chrome/browser/views/page_info_window_view.cc
parent1cb660eceb9de5b7d1ea7b97be06034c0cae8ae0 (diff)
downloadchromium_src-b232fc0b33f3c21a90918be4b646ccef388c9e63.zip
chromium_src-b232fc0b33f3c21a90918be4b646ccef388c9e63.tar.gz
chromium_src-b232fc0b33f3c21a90918be4b646ccef388c9e63.tar.bz2
Relanding the page info on Gtk Linux.
Review URL: http://codereview.chromium.org/159657 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22112 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/page_info_window_view.cc')
-rw-r--r--chrome/browser/views/page_info_window_view.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/views/page_info_window_view.cc b/chrome/browser/views/page_info_window_view.cc
index 4e3b020..987552b6 100644
--- a/chrome/browser/views/page_info_window_view.cc
+++ b/chrome/browser/views/page_info_window_view.cc
@@ -13,8 +13,10 @@
#include "app/resource_bundle.h"
#include "app/l10n_util.h"
#include "base/compiler_specific.h"
+#include "base/string_util.h"
#include "chrome/browser/cert_store.h"
#include "chrome/browser/page_info_model.h"
+#include "chrome/browser/page_info_window.h"
#include "chrome/common/pref_names.h"
#include "grit/locale_settings.h"
#include "grit/generated_resources.h"
@@ -109,10 +111,10 @@ class PageInfoWindowView : public views::View,
// optional head-line (in bold) and a description.
class Section : public views::View {
public:
- Section(const std::wstring& title,
+ Section(const string16& title,
bool state,
- const std::wstring& head_line,
- const std::wstring& description);
+ const string16& head_line,
+ const string16& description);
virtual ~Section();
virtual int GetHeightForWidth(int w);
@@ -120,16 +122,16 @@ class Section : public views::View {
private:
// The text placed on top of the section (on the left of the separator bar).
- std::wstring title_;
+ string16 title_;
// Whether to show the good/bad icon.
bool state_;
// The first line of the description, show in bold.
- std::wstring head_line_;
+ string16 head_line_;
// The description, displayed below the head line.
- std::wstring description_;
+ string16 description_;
static SkBitmap* good_state_icon_;
static SkBitmap* bad_state_icon_;
@@ -361,10 +363,10 @@ void PageInfoWindowView::ShowCertDialog(int cert_id) {
////////////////////////////////////////////////////////////////////////////////
// Section
-Section::Section(const std::wstring& title,
+Section::Section(const string16& title,
bool state,
- const std::wstring& head_line,
- const std::wstring& description)
+ const string16& head_line,
+ const string16& description)
: title_(title),
state_(state),
head_line_(head_line),
@@ -374,7 +376,7 @@ Section::Section(const std::wstring& title,
good_state_icon_ = rb.GetBitmapNamed(IDR_PAGEINFO_GOOD);
bad_state_icon_ = rb.GetBitmapNamed(IDR_PAGEINFO_BAD);
}
- title_label_ = new views::Label(title);
+ title_label_ = new views::Label(UTF16ToWideHack(title));
title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(title_label_);
@@ -389,13 +391,13 @@ Section::Section(const std::wstring& title,
status_image_->SetImage(state ? good_state_icon_ : bad_state_icon_);
AddChildView(status_image_);
- head_line_label_ = new views::Label(head_line);
+ head_line_label_ = new views::Label(UTF16ToWideHack(head_line));
head_line_label_->SetFont(
head_line_label_->GetFont().DeriveFont(0, gfx::Font::BOLD));
head_line_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(head_line_label_);
- description_label_ = new views::Label(description);
+ description_label_ = new views::Label(UTF16ToWideHack(description));
description_label_->SetMultiLine(true);
description_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
AddChildView(description_label_);