OLD | NEW |
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 IDS_OPTIONS_SETTINGS_JOIN_WIMAX_NETWORKS)); | 213 IDS_OPTIONS_SETTINGS_JOIN_WIMAX_NETWORKS)); |
214 title->SetFont(title->font().DeriveFont(1, gfx::Font::BOLD)); | 214 title->SetFont(title->font().DeriveFont(1, gfx::Font::BOLD)); |
215 layout->AddView(title, 5, 1); | 215 layout->AddView(title, 5, 1); |
216 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 216 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
217 | 217 |
218 // Netowrk name | 218 // Netowrk name |
219 layout->StartRow(0, column_view_set_id); | 219 layout->StartRow(0, column_view_set_id); |
220 layout->AddView(new views::Label(l10n_util::GetStringUTF16( | 220 layout->AddView(new views::Label(l10n_util::GetStringUTF16( |
221 IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK))); | 221 IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK))); |
222 views::Label* label = new views::Label(UTF8ToUTF16(wimax->name())); | 222 views::Label* label = new views::Label(UTF8ToUTF16(wimax->name())); |
223 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 223 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
224 layout->AddView(label); | 224 layout->AddView(label); |
225 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 225 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
226 | 226 |
227 // Identity | 227 // Identity |
228 layout->StartRow(0, column_view_set_id); | 228 layout->StartRow(0, column_view_set_id); |
229 identity_label_ = new views::Label(l10n_util::GetStringUTF16( | 229 identity_label_ = new views::Label(l10n_util::GetStringUTF16( |
230 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY)); | 230 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY)); |
231 layout->AddView(identity_label_); | 231 layout->AddView(identity_label_); |
232 identity_textfield_ = new views::Textfield( | 232 identity_textfield_ = new views::Textfield( |
233 views::Textfield::STYLE_DEFAULT); | 233 views::Textfield::STYLE_DEFAULT); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 layout->SkipColumns(1); | 315 layout->SkipColumns(1); |
316 layout->AddView(share_network_checkbox_); | 316 layout->AddView(share_network_checkbox_); |
317 } | 317 } |
318 } | 318 } |
319 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 319 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
320 | 320 |
321 // Create an error label. | 321 // Create an error label. |
322 layout->StartRow(0, column_view_set_id); | 322 layout->StartRow(0, column_view_set_id); |
323 layout->SkipColumns(1); | 323 layout->SkipColumns(1); |
324 error_label_ = new views::Label(); | 324 error_label_ = new views::Label(); |
325 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 325 error_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
326 error_label_->SetEnabledColor(SK_ColorRED); | 326 error_label_->SetEnabledColor(SK_ColorRED); |
327 layout->AddView(error_label_); | 327 layout->AddView(error_label_); |
328 | 328 |
329 UpdateErrorLabel(); | 329 UpdateErrorLabel(); |
330 } | 330 } |
331 | 331 |
332 void WimaxConfigView::InitFocus() { | 332 void WimaxConfigView::InitFocus() { |
333 views::View* view_to_focus = GetInitiallyFocusedView(); | 333 views::View* view_to_focus = GetInitiallyFocusedView(); |
334 if (view_to_focus) | 334 if (view_to_focus) |
335 view_to_focus->RequestFocus(); | 335 view_to_focus->RequestFocus(); |
336 } | 336 } |
337 | 337 |
338 } // namespace chromeos | 338 } // namespace chromeos |
OLD | NEW |