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

Side by Side Diff: chrome/browser/chromeos/options/wimax_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/options/wimax_config_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/options/wimax_config_view.h" 5 #include "chrome/browser/chromeos/options/wimax_config_view.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/cros/cros_library.h" 10 #include "chrome/browser/chromeos/cros/cros_library.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 passphrase_label_(NULL), 42 passphrase_label_(NULL),
43 passphrase_textfield_(NULL), 43 passphrase_textfield_(NULL),
44 passphrase_visible_button_(NULL), 44 passphrase_visible_button_(NULL),
45 error_label_(NULL) { 45 error_label_(NULL) {
46 Init(wimax); 46 Init(wimax);
47 } 47 }
48 48
49 WimaxConfigView::~WimaxConfigView() { 49 WimaxConfigView::~WimaxConfigView() {
50 } 50 }
51 51
52 string16 WimaxConfigView::GetTitle() const {
53 return l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_JOIN_WIMAX_NETWORKS);
54 }
55
52 views::View* WimaxConfigView::GetInitiallyFocusedView() { 56 views::View* WimaxConfigView::GetInitiallyFocusedView() {
53 if (identity_textfield_ && identity_textfield_->enabled()) 57 if (identity_textfield_ && identity_textfield_->enabled())
54 return identity_textfield_; 58 return identity_textfield_;
55 if (passphrase_textfield_ && passphrase_textfield_->enabled()) 59 if (passphrase_textfield_ && passphrase_textfield_->enabled())
56 return passphrase_textfield_; 60 return passphrase_textfield_;
57 return NULL; 61 return NULL;
58 } 62 }
59 63
60 bool WimaxConfigView::CanLogin() { 64 bool WimaxConfigView::CanLogin() {
61 // In OOBE it may be valid to log in with no credentials (crbug.com/137776). 65 // In OOBE it may be valid to log in with no credentials (crbug.com/137776).
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing); 205 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing);
202 // Textfield, combobox. 206 // Textfield, combobox.
203 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, 207 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1,
204 views::GridLayout::USE_PREF, 0, 208 views::GridLayout::USE_PREF, 0,
205 ChildNetworkConfigView::kInputFieldMinWidth); 209 ChildNetworkConfigView::kInputFieldMinWidth);
206 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing); 210 column_set->AddPaddingColumn(0, views::kRelatedControlSmallHorizontalSpacing);
207 // Password visible button / policy indicator. 211 // Password visible button / policy indicator.
208 column_set->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1, 212 column_set->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL, 1,
209 views::GridLayout::USE_PREF, 0, kPasswordVisibleWidth); 213 views::GridLayout::USE_PREF, 0, kPasswordVisibleWidth);
210 214
211 // Title 215 // Network name
212 layout->StartRow(0, column_view_set_id);
213 views::Label* title = new views::Label(l10n_util::GetStringUTF16(
214 IDS_OPTIONS_SETTINGS_JOIN_WIMAX_NETWORKS));
215 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
216 title->SetFont(rb.GetFont(ui::ResourceBundle::MediumFont));
217 layout->AddView(title, 5, 1);
218 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
219
220 // Netowrk name
221 layout->StartRow(0, column_view_set_id); 216 layout->StartRow(0, column_view_set_id);
222 layout->AddView(new views::Label(l10n_util::GetStringUTF16( 217 layout->AddView(new views::Label(l10n_util::GetStringUTF16(
223 IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK))); 218 IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK)));
224 views::Label* label = new views::Label(UTF8ToUTF16(wimax->name())); 219 views::Label* label = new views::Label(UTF8ToUTF16(wimax->name()));
225 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 220 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
226 layout->AddView(label); 221 layout->AddView(label);
227 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 222 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
228 223
229 // Identity 224 // Identity
230 layout->StartRow(0, column_view_set_id); 225 layout->StartRow(0, column_view_set_id);
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 UpdateErrorLabel(); 328 UpdateErrorLabel();
334 } 329 }
335 330
336 void WimaxConfigView::InitFocus() { 331 void WimaxConfigView::InitFocus() {
337 views::View* view_to_focus = GetInitiallyFocusedView(); 332 views::View* view_to_focus = GetInitiallyFocusedView();
338 if (view_to_focus) 333 if (view_to_focus)
339 view_to_focus->RequestFocus(); 334 view_to_focus->RequestFocus();
340 } 335 }
341 336
342 } // namespace chromeos 337 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/wimax_config_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698