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

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 11377005: Replace Label::Alignment with gfx::HorizontalAlignment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix remaining Label::Alignment references. Created 8 years, 1 month 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
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/wifi_config_view.h" 5 #include "chrome/browser/chromeos/options/wifi_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 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 layout->AddView(new views::Label(l10n_util::GetStringUTF16( 910 layout->AddView(new views::Label(l10n_util::GetStringUTF16(
911 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID))); 911 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID)));
912 if (!wifi) { 912 if (!wifi) {
913 ssid_textfield_ = new views::Textfield(views::Textfield::STYLE_DEFAULT); 913 ssid_textfield_ = new views::Textfield(views::Textfield::STYLE_DEFAULT);
914 ssid_textfield_->SetController(this); 914 ssid_textfield_->SetController(this);
915 ssid_textfield_->SetAccessibleName(l10n_util::GetStringUTF16( 915 ssid_textfield_->SetAccessibleName(l10n_util::GetStringUTF16(
916 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID)); 916 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID));
917 layout->AddView(ssid_textfield_); 917 layout->AddView(ssid_textfield_);
918 } else { 918 } else {
919 views::Label* label = new views::Label(UTF8ToUTF16(wifi->name())); 919 views::Label* label = new views::Label(UTF8ToUTF16(wifi->name()));
920 label->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 920 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
921 layout->AddView(label); 921 layout->AddView(label);
922 } 922 }
923 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 923 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
924 924
925 // Security select 925 // Security select
926 if (!wifi && !show_8021x) { 926 if (!wifi && !show_8021x) {
927 layout->StartRow(0, column_view_set_id); 927 layout->StartRow(0, column_view_set_id);
928 layout->AddView(new views::Label(l10n_util::GetStringUTF16( 928 layout->AddView(new views::Label(l10n_util::GetStringUTF16(
929 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY))); 929 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SECURITY)));
930 security_combobox_model_.reset(new internal::SecurityComboboxModel); 930 security_combobox_model_.reset(new internal::SecurityComboboxModel);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHARE_NETWORK)); 1117 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SHARE_NETWORK));
1118 layout->SkipColumns(1); 1118 layout->SkipColumns(1);
1119 layout->AddView(share_network_checkbox_); 1119 layout->AddView(share_network_checkbox_);
1120 } 1120 }
1121 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 1121 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
1122 1122
1123 // Create an error label. 1123 // Create an error label.
1124 layout->StartRow(0, column_view_set_id); 1124 layout->StartRow(0, column_view_set_id);
1125 layout->SkipColumns(1); 1125 layout->SkipColumns(1);
1126 error_label_ = new views::Label(); 1126 error_label_ = new views::Label();
1127 error_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 1127 error_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
1128 error_label_->SetEnabledColor(SK_ColorRED); 1128 error_label_->SetEnabledColor(SK_ColorRED);
1129 layout->AddView(error_label_); 1129 layout->AddView(error_label_);
1130 1130
1131 // Initialize the field and checkbox values. 1131 // Initialize the field and checkbox values.
1132 1132
1133 // After creating the fields, we set the values. Fields need to be created 1133 // After creating the fields, we set the values. Fields need to be created
1134 // first because RefreshEapFields() will enable/disable them as appropriate. 1134 // first because RefreshEapFields() will enable/disable them as appropriate.
1135 if (show_8021x) { 1135 if (show_8021x) {
1136 EAPMethod eap_method = (wifi ? wifi->eap_method() : EAP_METHOD_UNKNOWN); 1136 EAPMethod eap_method = (wifi ? wifi->eap_method() : EAP_METHOD_UNKNOWN);
1137 switch (eap_method) { 1137 switch (eap_method) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 void WifiConfigView::ParseWiFiEAPUIProperty( 1262 void WifiConfigView::ParseWiFiEAPUIProperty(
1263 NetworkPropertyUIData* property_ui_data, 1263 NetworkPropertyUIData* property_ui_data,
1264 Network* network, 1264 Network* network,
1265 const std::string& key) { 1265 const std::string& key) {
1266 ParseWiFiUIProperty( 1266 ParseWiFiUIProperty(
1267 property_ui_data, network, 1267 property_ui_data, network,
1268 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str())); 1268 base::StringPrintf("%s.%s", onc::wifi::kEAP, key.c_str()));
1269 } 1269 }
1270 1270
1271 } // namespace chromeos 1271 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/vpn_config_view.cc ('k') | chrome/browser/chromeos/options/wimax_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698