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

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

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/wimax_config_view.h" 5 #include "chrome/browser/chromeos/options/wimax_config_view.h"
6 6
7 #include "ash/system/chromeos/network/network_connect.h" 7 #include "ash/system/chromeos/network/network_connect.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 if (!error_msg.empty()) { 108 if (!error_msg.empty()) {
109 error_label_->SetText(error_msg); 109 error_label_->SetText(error_msg);
110 error_label_->SetVisible(true); 110 error_label_->SetVisible(true);
111 } else { 111 } else {
112 error_label_->SetVisible(false); 112 error_label_->SetVisible(false);
113 } 113 }
114 } 114 }
115 115
116 void WimaxConfigView::ContentsChanged(views::Textfield* sender, 116 void WimaxConfigView::ContentsChanged(views::Textfield* sender,
117 const string16& new_contents) { 117 const base::string16& new_contents) {
118 UpdateDialogButtons(); 118 UpdateDialogButtons();
119 } 119 }
120 120
121 bool WimaxConfigView::HandleKeyEvent(views::Textfield* sender, 121 bool WimaxConfigView::HandleKeyEvent(views::Textfield* sender,
122 const ui::KeyEvent& key_event) { 122 const ui::KeyEvent& key_event) {
123 if (sender == passphrase_textfield_ && 123 if (sender == passphrase_textfield_ &&
124 key_event.key_code() == ui::VKEY_RETURN) { 124 key_event.key_code() == ui::VKEY_RETURN) {
125 parent_->GetDialogClientView()->AcceptWindow(); 125 parent_->GetDialogClientView()->AcceptWindow();
126 } 126 }
127 return false; 127 return false;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 layout->StartRow(0, column_view_set_id); 230 layout->StartRow(0, column_view_set_id);
231 layout->AddView(new views::Label(l10n_util::GetStringUTF16( 231 layout->AddView(new views::Label(l10n_util::GetStringUTF16(
232 IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK))); 232 IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK)));
233 views::Label* label = new views::Label(UTF8ToUTF16(wimax->name())); 233 views::Label* label = new views::Label(UTF8ToUTF16(wimax->name()));
234 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 234 label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
235 layout->AddView(label); 235 layout->AddView(label);
236 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 236 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
237 237
238 // Identity 238 // Identity
239 layout->StartRow(0, column_view_set_id); 239 layout->StartRow(0, column_view_set_id);
240 string16 identity_label_text = l10n_util::GetStringUTF16( 240 base::string16 identity_label_text = l10n_util::GetStringUTF16(
241 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY); 241 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY);
242 identity_label_ = new views::Label(identity_label_text); 242 identity_label_ = new views::Label(identity_label_text);
243 layout->AddView(identity_label_); 243 layout->AddView(identity_label_);
244 identity_textfield_ = new views::Textfield( 244 identity_textfield_ = new views::Textfield(
245 views::Textfield::STYLE_DEFAULT); 245 views::Textfield::STYLE_DEFAULT);
246 identity_textfield_->SetAccessibleName(identity_label_text); 246 identity_textfield_->SetAccessibleName(identity_label_text);
247 identity_textfield_->SetController(this); 247 identity_textfield_->SetController(this);
248 identity_textfield_->SetEnabled(identity_ui_data_.IsEditable()); 248 identity_textfield_->SetEnabled(identity_ui_data_.IsEditable());
249 layout->AddView(identity_textfield_); 249 layout->AddView(identity_textfield_);
250 layout->AddView(new ControlledSettingIndicatorView(identity_ui_data_)); 250 layout->AddView(new ControlledSettingIndicatorView(identity_ui_data_));
251 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 251 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
252 252
253 // Passphrase input 253 // Passphrase input
254 layout->StartRow(0, column_view_set_id); 254 layout->StartRow(0, column_view_set_id);
255 string16 passphrase_label_text = l10n_util::GetStringUTF16( 255 base::string16 passphrase_label_text = l10n_util::GetStringUTF16(
256 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE); 256 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE);
257 passphrase_label_ = new views::Label(passphrase_label_text); 257 passphrase_label_ = new views::Label(passphrase_label_text);
258 layout->AddView(passphrase_label_); 258 layout->AddView(passphrase_label_);
259 passphrase_textfield_ = new views::Textfield( 259 passphrase_textfield_ = new views::Textfield(
260 views::Textfield::STYLE_OBSCURED); 260 views::Textfield::STYLE_OBSCURED);
261 passphrase_textfield_->SetController(this); 261 passphrase_textfield_->SetController(this);
262 passphrase_label_->SetEnabled(true); 262 passphrase_label_->SetEnabled(true);
263 passphrase_textfield_->SetEnabled(passphrase_ui_data_.IsEditable()); 263 passphrase_textfield_->SetEnabled(passphrase_ui_data_.IsEditable());
264 passphrase_textfield_->SetAccessibleName(passphrase_label_text); 264 passphrase_textfield_->SetAccessibleName(passphrase_label_text);
265 layout->AddView(passphrase_textfield_); 265 layout->AddView(passphrase_textfield_);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 371 }
372 } 372 }
373 373
374 void WimaxConfigView::InitFocus() { 374 void WimaxConfigView::InitFocus() {
375 views::View* view_to_focus = GetInitiallyFocusedView(); 375 views::View* view_to_focus = GetInitiallyFocusedView();
376 if (view_to_focus) 376 if (view_to_focus)
377 view_to_focus->RequestFocus(); 377 view_to_focus->RequestFocus();
378 } 378 }
379 379
380 } // namespace chromeos 380 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698