OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/wifi_config_view.h" | 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.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" |
11 #include "chrome/browser/chromeos/login/user_manager.h" | 11 #include "chrome/browser/chromeos/login/user_manager.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 } | 275 } |
276 | 276 |
277 const std::string WifiConfigView::GetPassphrase() const { | 277 const std::string WifiConfigView::GetPassphrase() const { |
278 std::string result; | 278 std::string result; |
279 if (passphrase_textfield_ != NULL) | 279 if (passphrase_textfield_ != NULL) |
280 result = UTF16ToUTF8(passphrase_textfield_->text()); | 280 result = UTF16ToUTF8(passphrase_textfield_->text()); |
281 return result; | 281 return result; |
282 } | 282 } |
283 | 283 |
284 void WifiConfigView::Init() { | 284 void WifiConfigView::Init() { |
285 views::GridLayout* layout = CreatePanelGridLayout(this); | 285 views::GridLayout* layout = views::GridLayout::CreatePanel(this); |
286 SetLayoutManager(layout); | 286 SetLayoutManager(layout); |
287 | 287 |
288 int column_view_set_id = 0; | 288 int column_view_set_id = 0; |
289 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); | 289 views::ColumnSet* column_set = layout->AddColumnSet(column_view_set_id); |
290 // Label | 290 // Label |
291 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, | 291 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::FILL, 1, |
292 views::GridLayout::USE_PREF, 0, 0); | 292 views::GridLayout::USE_PREF, 0, 0); |
293 // Textfield | 293 // Textfield |
294 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, | 294 column_set->AddColumn(views::GridLayout::FILL, views::GridLayout::FILL, 1, |
295 views::GridLayout::USE_PREF, 0, kPasswordWidth); | 295 views::GridLayout::USE_PREF, 0, kPasswordWidth); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 error_label_ = new views::Label(); | 408 error_label_ = new views::Label(); |
409 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 409 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
410 error_label_->SetColor(SK_ColorRED); | 410 error_label_->SetColor(SK_ColorRED); |
411 layout->AddView(error_label_); | 411 layout->AddView(error_label_); |
412 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 412 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
413 // Set or hide the error text. | 413 // Set or hide the error text. |
414 UpdateErrorLabel(false); | 414 UpdateErrorLabel(false); |
415 } | 415 } |
416 | 416 |
417 } // namespace chromeos | 417 } // namespace chromeos |
OLD | NEW |