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

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

Issue 9965017: views: Rename ComboboxListener::ItemChanged to something more accurate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: combo_box -> combobox Created 8 years, 8 months 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/vpn_config_view.h" 5 #include "chrome/browser/chromeos/options/vpn_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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 key_event.key_code() == ui::VKEY_RETURN) { 219 key_event.key_code() == ui::VKEY_RETURN) {
220 parent_->GetDialogClientView()->AcceptWindow(); 220 parent_->GetDialogClientView()->AcceptWindow();
221 } 221 }
222 return false; 222 return false;
223 } 223 }
224 224
225 void VPNConfigView::ButtonPressed(views::Button* sender, 225 void VPNConfigView::ButtonPressed(views::Button* sender,
226 const views::Event& event) { 226 const views::Event& event) {
227 } 227 }
228 228
229 void VPNConfigView::ItemChanged(views::Combobox* combo_box, 229 void VPNConfigView::OnSelectedIndexChanged(views::Combobox* combobox) {
230 int prev_index, int new_index) { 230 if (combobox == provider_type_combobox_) {
231 if (prev_index == new_index) 231 provider_type_ = static_cast<ProviderType>(combobox->selected_index());
232 return;
233 if (combo_box == provider_type_combobox_) {
234 provider_type_ = static_cast<ProviderType>(new_index);
235 UpdateControls(); 232 UpdateControls();
236 } else if (combo_box == user_cert_combobox_ || 233 } else if (combobox == user_cert_combobox_ ||
237 combo_box == server_ca_cert_combobox_) { 234 combobox == server_ca_cert_combobox_) {
238 // Do nothing. 235 // Do nothing.
239 } else { 236 } else {
240 NOTREACHED(); 237 NOTREACHED();
241 } 238 }
242 UpdateErrorLabel(); 239 UpdateErrorLabel();
243 UpdateCanLogin(); 240 UpdateCanLogin();
244 } 241 }
245 242
246 void VPNConfigView::OnCertificatesLoaded(bool initial_load) { 243 void VPNConfigView::OnCertificatesLoaded(bool initial_load) {
247 Refresh(); 244 Refresh();
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 std::string vpn_type; 814 std::string vpn_type;
818 if (!vpn_dict || !vpn_dict->GetString(onc::kType, &vpn_type)) 815 if (!vpn_dict || !vpn_dict->GetString(onc::kType, &vpn_type))
819 return; 816 return;
820 817
821 property_ui_data->ParseOncProperty( 818 property_ui_data->ParseOncProperty(
822 network->ui_data(), onc, 819 network->ui_data(), onc,
823 base::StringPrintf("%s.%s.%s", onc::kVPN, vpn_type.c_str(), key.c_str())); 820 base::StringPrintf("%s.%s.%s", onc::kVPN, vpn_type.c_str(), key.c_str()));
824 } 821 }
825 822
826 } // namespace chromeos 823 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/vpn_config_view.h ('k') | chrome/browser/chromeos/options/wifi_config_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698