| Index: chrome/browser/chromeos/options/vpn_config_view.cc
|
| diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc
|
| index b73515cbca35a28b339053f2f3c1ffd5caa22cdc..124c925b4d13d33dc3d719ed36e422d7985ed7b8 100644
|
| --- a/chrome/browser/chromeos/options/vpn_config_view.cc
|
| +++ b/chrome/browser/chromeos/options/vpn_config_view.cc
|
| @@ -195,12 +195,14 @@ string16 VpnUserCertComboboxModel::GetItemAt(int index) {
|
| } // namespace internal
|
|
|
| VPNConfigView::VPNConfigView(NetworkConfigView* parent, VirtualNetwork* vpn)
|
| - : ChildNetworkConfigView(parent, vpn) {
|
| + : ChildNetworkConfigView(parent, vpn),
|
| + title_(0) {
|
| Init(vpn);
|
| }
|
|
|
| VPNConfigView::VPNConfigView(NetworkConfigView* parent)
|
| - : ChildNetworkConfigView(parent) {
|
| + : ChildNetworkConfigView(parent),
|
| + title_(0) {
|
| Init(NULL);
|
| }
|
|
|
| @@ -208,6 +210,11 @@ VPNConfigView::~VPNConfigView() {
|
| CertLibrary::Get()->RemoveObserver(this);
|
| }
|
|
|
| +string16 VPNConfigView::GetTitle() const {
|
| + DCHECK_NE(title_, 0);
|
| + return l10n_util::GetStringUTF16(title_);
|
| +}
|
| +
|
| views::View* VPNConfigView::GetInitiallyFocusedView() {
|
| // Put focus in the first editable field.
|
| if (server_textfield_)
|
| @@ -505,14 +512,8 @@ void VPNConfigView::Init(VirtualNetwork* vpn) {
|
| enable_group_name_ = true;
|
| }
|
|
|
| - // Title
|
| - layout->StartRow(0, column_view_set_id);
|
| - views::Label* title = new views::Label(l10n_util::GetStringUTF16(
|
| - vpn ? IDS_OPTIONS_SETTINGS_JOIN_VPN : IDS_OPTIONS_SETTINGS_ADD_VPN));
|
| - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| - title->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
|
| - layout->AddView(title, 5, 1);
|
| - layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
|
| + // Initialize the title string ID used for the dialog.
|
| + title_ = vpn ? IDS_OPTIONS_SETTINGS_JOIN_VPN : IDS_OPTIONS_SETTINGS_ADD_VPN;
|
|
|
| // Server label and input.
|
| // Only provide Server name when configuring a new VPN.
|
|
|