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

Unified Diff: chrome/browser/ui/views/ssl_client_certificate_selector.cc

Issue 9187027: Attempt 2 at: Adds a trivial views based table implementation (only supports single (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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/hung_renderer_view.cc ('k') | chrome/browser/ui/webui/hung_renderer_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/ssl_client_certificate_selector.cc
diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector.cc b/chrome/browser/ui/views/ssl_client_certificate_selector.cc
index d84fdfe3e8898ef93a69d8fd84770a9e1f479061..93ea62bc79b8f7883c2f672a706a2ac44780f3b2 100644
--- a/chrome/browser/ui/views/ssl_client_certificate_selector.cc
+++ b/chrome/browser/ui/views/ssl_client_certificate_selector.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -114,9 +114,9 @@ void SSLClientCertificateSelector::Init() {
1, views::GridLayout::USE_PREF, 0, 0);
layout->StartRow(0, column_set_id);
- std::wstring text = UTF16ToWide(l10n_util::GetStringFUTF16(
+ string16 text = l10n_util::GetStringFUTF16(
IDS_CLIENT_CERT_DIALOG_TEXT,
- ASCIIToUTF16(cert_request_info_->host_and_port)));
+ ASCIIToUTF16(cert_request_info_->host_and_port));
views::Label* label = new views::Label(text);
label->SetMultiLine(true);
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
@@ -127,7 +127,9 @@ void SSLClientCertificateSelector::Init() {
CreateCertTable();
layout->StartRow(1, column_set_id);
- layout->AddView(table_);
+ layout->AddView(table_->CreateParentIfNecessary(), 1, 1,
+ views::GridLayout::FILL,
+ views::GridLayout::FILL, kTableViewWidth, kTableViewHeight);
layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
@@ -258,13 +260,12 @@ void SSLClientCertificateSelector::CreateCertTable() {
true, // single_selection
true, // resizable_columns
true); // autosize_columns
- table_->SetPreferredSize(gfx::Size(kTableViewWidth, kTableViewHeight));
table_->SetObserver(this);
}
void SSLClientCertificateSelector::CreateViewCertButton() {
- view_cert_button_ = new views::NativeTextButton(this, UTF16ToWide(
- l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON)));
+ view_cert_button_ = new views::NativeTextButton(this,
+ l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON));
// Wrap the view cert button in a grid layout in order to left-align it.
view_cert_button_container_ = new views::View();
« no previous file with comments | « chrome/browser/ui/views/hung_renderer_view.cc ('k') | chrome/browser/ui/webui/hung_renderer_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698