| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/resource_bundle.h" | 8 #include "app/resource_bundle.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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 UpdateCanLogin(); | 80 UpdateCanLogin(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void WifiConfigView::ButtonPressed(views::Button* sender, | 83 void WifiConfigView::ButtonPressed(views::Button* sender, |
| 84 const views::Event& event) { | 84 const views::Event& event) { |
| 85 if (sender == passphrase_visible_button_) { | 85 if (sender == passphrase_visible_button_) { |
| 86 if (passphrase_textfield_) | 86 if (passphrase_textfield_) |
| 87 passphrase_textfield_->SetPassword(!passphrase_textfield_->IsPassword()); | 87 passphrase_textfield_->SetPassword(!passphrase_textfield_->IsPassword()); |
| 88 } else if (sender == certificate_browse_button_) { | 88 } else if (sender == certificate_browse_button_) { |
| 89 select_file_dialog_ = SelectFileDialog::Create(this); | 89 select_file_dialog_ = SelectFileDialog::Create(this); |
| 90 select_file_dialog_->set_browser_mode(parent_->is_browser_mode()); |
| 90 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, | 91 select_file_dialog_->SelectFile(SelectFileDialog::SELECT_OPEN_FILE, |
| 91 string16(), FilePath(), NULL, 0, | 92 string16(), FilePath(), NULL, 0, |
| 92 std::string(), NULL, NULL); | 93 std::string(), |
| 94 parent_->is_browser_mode() ? |
| 95 NULL : |
| 96 parent_->GetNativeWindow(), |
| 97 NULL); |
| 93 } else { | 98 } else { |
| 94 NOTREACHED(); | 99 NOTREACHED(); |
| 95 } | 100 } |
| 96 } | 101 } |
| 97 | 102 |
| 98 void WifiConfigView::FileSelected(const FilePath& path, | 103 void WifiConfigView::FileSelected(const FilePath& path, |
| 99 int index, void* params) { | 104 int index, void* params) { |
| 100 certificate_path_ = path; | 105 certificate_path_ = path; |
| 101 certificate_browse_button_->SetLabel(path.BaseName().ToWStringHack()); | 106 certificate_browse_button_->SetLabel(path.BaseName().ToWStringHack()); |
| 102 UpdateCanLogin(); // TODO(njw) Check if the passphrase decrypts the key. | 107 UpdateCanLogin(); // TODO(njw) Check if the passphrase decrypts the key. |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 l10n_util::GetString(IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT)); | 266 l10n_util::GetString(IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT)); |
| 262 // For other network, default to autoconnect. | 267 // For other network, default to autoconnect. |
| 263 bool autoconnect = other_network_ || wifi_.auto_connect(); | 268 bool autoconnect = other_network_ || wifi_.auto_connect(); |
| 264 autoconnect_checkbox_->SetChecked(autoconnect); | 269 autoconnect_checkbox_->SetChecked(autoconnect); |
| 265 layout->StartRow(0, column_view_set_id); | 270 layout->StartRow(0, column_view_set_id); |
| 266 layout->AddView(autoconnect_checkbox_, 3, 1); | 271 layout->AddView(autoconnect_checkbox_, 3, 1); |
| 267 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 272 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 268 } | 273 } |
| 269 | 274 |
| 270 } // namespace chromeos | 275 } // namespace chromeos |
| OLD | NEW |