OLD | NEW |
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 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 virtual void OnCertificatesLoaded(bool initial_load) OVERRIDE; | 67 virtual void OnCertificatesLoaded(bool initial_load) OVERRIDE; |
68 | 68 |
69 // ChildNetworkConfigView: | 69 // ChildNetworkConfigView: |
70 virtual string16 GetTitle() OVERRIDE; | 70 virtual string16 GetTitle() OVERRIDE; |
71 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 71 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
72 virtual bool CanLogin() OVERRIDE; | 72 virtual bool CanLogin() OVERRIDE; |
73 virtual bool Login() OVERRIDE; | 73 virtual bool Login() OVERRIDE; |
74 virtual void Cancel() OVERRIDE; | 74 virtual void Cancel() OVERRIDE; |
75 virtual void InitFocus() OVERRIDE; | 75 virtual void InitFocus() OVERRIDE; |
76 | 76 |
| 77 // Parses a WiFi UI |property| from the ONC associated with |network|. |key| |
| 78 // is the property name within the ONC WiFi dictionary. |
| 79 static void ParseWiFiUIProperty(NetworkPropertyUIData* property_ui_data, |
| 80 Network* network, |
| 81 const std::string& key); |
| 82 |
| 83 // Parses a WiFi EAP UI |property| from the ONC associated with |network|. |
| 84 // |key| is the property name within the ONC WiFi.EAP dictionary. |
| 85 static void ParseWiFiEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
| 86 Network* network, |
| 87 const std::string& key); |
| 88 |
77 private: | 89 private: |
78 // Initializes UI. If |show_8021x| includes 802.1x config options. | 90 // Initializes UI. If |show_8021x| includes 802.1x config options. |
79 void Init(WifiNetwork* wifi, bool show_8021x); | 91 void Init(WifiNetwork* wifi, bool show_8021x); |
80 | 92 |
81 // Get input values. | 93 // Get input values. |
82 std::string GetSsid() const; | 94 std::string GetSsid() const; |
83 std::string GetPassphrase() const; | 95 std::string GetPassphrase() const; |
84 bool GetSaveCredentials() const; | 96 bool GetSaveCredentials() const; |
85 bool GetShareNetwork(bool share_default) const; | 97 bool GetShareNetwork(bool share_default) const; |
86 | 98 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 131 |
120 // Enable/Disable EAP fields as appropriate based on selected EAP method. | 132 // Enable/Disable EAP fields as appropriate based on selected EAP method. |
121 void RefreshEapFields(); | 133 void RefreshEapFields(); |
122 | 134 |
123 // Enable/Disable "share this network" checkbox. | 135 // Enable/Disable "share this network" checkbox. |
124 void RefreshShareCheckbox(); | 136 void RefreshShareCheckbox(); |
125 | 137 |
126 // Updates the error text label. | 138 // Updates the error text label. |
127 void UpdateErrorLabel(); | 139 void UpdateErrorLabel(); |
128 | 140 |
129 // Parses a WiFi UI |property| from the ONC associated with |network|. |key| | |
130 // is the property name within the ONC WiFi dictionary. | |
131 void ParseWiFiUIProperty(NetworkPropertyUIData* property_ui_data, | |
132 Network* network, | |
133 const std::string& key); | |
134 | |
135 // Parses a WiFi EAP UI |property| from the ONC associated with |network|. | |
136 // |key| is the property name within the ONC WiFi.EAP dictionary. | |
137 void ParseWiFiEAPUIProperty(NetworkPropertyUIData* property_ui_data, | |
138 Network* network, | |
139 const std::string& key); | |
140 | |
141 CertLibrary* cert_library_; | 141 CertLibrary* cert_library_; |
142 | 142 |
143 NetworkPropertyUIData eap_method_ui_data_; | 143 NetworkPropertyUIData eap_method_ui_data_; |
144 NetworkPropertyUIData phase_2_auth_ui_data_; | 144 NetworkPropertyUIData phase_2_auth_ui_data_; |
145 NetworkPropertyUIData user_cert_ui_data_; | 145 NetworkPropertyUIData user_cert_ui_data_; |
146 NetworkPropertyUIData server_ca_cert_ui_data_; | 146 NetworkPropertyUIData server_ca_cert_ui_data_; |
147 NetworkPropertyUIData identity_ui_data_; | 147 NetworkPropertyUIData identity_ui_data_; |
148 NetworkPropertyUIData identity_anonymous_ui_data_; | 148 NetworkPropertyUIData identity_anonymous_ui_data_; |
149 NetworkPropertyUIData save_credentials_ui_data_; | 149 NetworkPropertyUIData save_credentials_ui_data_; |
150 NetworkPropertyUIData passphrase_ui_data_; | 150 NetworkPropertyUIData passphrase_ui_data_; |
(...skipping 24 matching lines...) Expand all Loading... |
175 views::Textfield* passphrase_textfield_; | 175 views::Textfield* passphrase_textfield_; |
176 views::ToggleImageButton* passphrase_visible_button_; | 176 views::ToggleImageButton* passphrase_visible_button_; |
177 views::Label* error_label_; | 177 views::Label* error_label_; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); | 179 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); |
180 }; | 180 }; |
181 | 181 |
182 } // namespace chromeos | 182 } // namespace chromeos |
183 | 183 |
184 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 184 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
OLD | NEW |