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

Unified Diff: chrome/browser/chromeos/options/vpn_config_view.cc

Issue 15682004: Remove the network config dialog extra border. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also fix the network config view titles. Created 7 years, 7 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
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.
« no previous file with comments | « chrome/browser/chromeos/options/vpn_config_view.h ('k') | chrome/browser/chromeos/options/wifi_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698