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

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

Issue 10825254: Remove views::KeyEvent, replacing uses of it with ui::KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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"
11 #include "chrome/browser/chromeos/cros/onc_constants.h" 11 #include "chrome/browser/chromeos/cros/onc_constants.h"
12 #include "chrome/browser/chromeos/enrollment_dialog_view.h" 12 #include "chrome/browser/chromeos/enrollment_dialog_view.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/common/net/x509_certificate_model.h" 14 #include "chrome/common/net/x509_certificate_model.h"
15 #include "grit/chromium_strings.h" 15 #include "grit/chromium_strings.h"
16 #include "grit/generated_resources.h" 16 #include "grit/generated_resources.h"
17 #include "grit/locale_settings.h" 17 #include "grit/locale_settings.h"
18 #include "grit/theme_resources.h" 18 #include "grit/theme_resources.h"
19 #include "net/base/cert_database.h" 19 #include "net/base/cert_database.h"
20 #include "net/base/x509_certificate.h" 20 #include "net/base/x509_certificate.h"
21 #include "ui/base/event.h"
21 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/models/combobox_model.h" 23 #include "ui/base/models/combobox_model.h"
23 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
24 #include "ui/views/controls/combobox/combobox.h" 25 #include "ui/views/controls/combobox/combobox.h"
25 #include "ui/views/controls/label.h" 26 #include "ui/views/controls/label.h"
26 #include "ui/views/controls/textfield/textfield.h" 27 #include "ui/views/controls/textfield/textfield.h"
27 #include "ui/views/layout/grid_layout.h" 28 #include "ui/views/layout/grid_layout.h"
28 #include "ui/views/layout/layout_constants.h" 29 #include "ui/views/layout/layout_constants.h"
29 #include "ui/views/widget/widget.h" 30 #include "ui/views/widget/widget.h"
30 31
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 if (sender == service_textfield_) { 261 if (sender == service_textfield_) {
261 if (new_contents.empty()) 262 if (new_contents.empty())
262 service_text_modified_ = false; 263 service_text_modified_ = false;
263 else if (new_contents != service_name_from_server_) 264 else if (new_contents != service_name_from_server_)
264 service_text_modified_ = true; 265 service_text_modified_ = true;
265 } 266 }
266 UpdateCanLogin(); 267 UpdateCanLogin();
267 } 268 }
268 269
269 bool VPNConfigView::HandleKeyEvent(views::Textfield* sender, 270 bool VPNConfigView::HandleKeyEvent(views::Textfield* sender,
270 const views::KeyEvent& key_event) { 271 const ui::KeyEvent& key_event) {
271 if ((sender == psk_passphrase_textfield_ || 272 if ((sender == psk_passphrase_textfield_ ||
272 sender == user_passphrase_textfield_) && 273 sender == user_passphrase_textfield_) &&
273 key_event.key_code() == ui::VKEY_RETURN) { 274 key_event.key_code() == ui::VKEY_RETURN) {
274 parent_->GetDialogClientView()->AcceptWindow(); 275 parent_->GetDialogClientView()->AcceptWindow();
275 } 276 }
276 return false; 277 return false;
277 } 278 }
278 279
279 void VPNConfigView::ButtonPressed(views::Button* sender, 280 void VPNConfigView::ButtonPressed(views::Button* sender,
280 const views::Event& event) { 281 const views::Event& event) {
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary(); 889 NetworkLibrary* network_library = CrosLibrary::Get()->GetNetworkLibrary();
889 const base::DictionaryValue* onc = 890 const base::DictionaryValue* onc =
890 network_library->FindOncForNetwork(network->unique_id()); 891 network_library->FindOncForNetwork(network->unique_id());
891 892
892 property_ui_data->ParseOncProperty( 893 property_ui_data->ParseOncProperty(
893 network->ui_data(), onc, 894 network->ui_data(), onc,
894 base::StringPrintf("%s.%s.%s", onc::kVPN, dict_key.c_str(), key.c_str())); 895 base::StringPrintf("%s.%s.%s", onc::kVPN, dict_key.c_str(), key.c_str()));
895 } 896 }
896 897
897 } // namespace chromeos 898 } // 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