| 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 | 5 |
| 6 // Network status constants. | 6 // Network status constants. |
| 7 const StatusConnected = 'connected'; | 7 const StatusConnected = 'connected'; |
| 8 const StatusDisconnected = 'disconnected'; | 8 const StatusDisconnected = 'disconnected'; |
| 9 const StatusConnecting = 'connecting'; | 9 const StatusConnecting = 'connecting'; |
| 10 const StatusError = 'error'; | 10 const StatusError = 'error'; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 this.passwordEdit.value, | 136 this.passwordEdit.value, |
| 137 this.ssidEdit.value, | 137 this.ssidEdit.value, |
| 138 this.rememberCheckbox.checked); | 138 this.rememberCheckbox.checked); |
| 139 } | 139 } |
| 140 } else if (this.passwordEdit) { | 140 } else if (this.passwordEdit) { |
| 141 if (this.passwordEdit.value) { | 141 if (this.passwordEdit.value) { |
| 142 sendConnect(index, | 142 sendConnect(index, |
| 143 this.passwordEdit.value, '', this.rememberCheckbox.checked); | 143 this.passwordEdit.value, '', this.rememberCheckbox.checked); |
| 144 } | 144 } |
| 145 } else { | 145 } else { |
| 146 sendConnect(index, '', '', this.rememberCheckbox.checked); | 146 if (this.attrs.remembered) { |
| 147 sendConnect(index, this.attrs.passphrase, '', |
| 148 this.rememberCheckbox.checked); |
| 149 } else { |
| 150 sendConnect(index, '', '', this.rememberCheckbox.checked); |
| 151 } |
| 147 } | 152 } |
| 148 }, | 153 }, |
| 149 | 154 |
| 150 /** | 155 /** |
| 151 * Handle keydown event in ssid edit. | 156 * Handle keydown event in ssid edit. |
| 152 * @private | 157 * @private |
| 153 */ | 158 */ |
| 154 handleSsidEditKeydown_: function(e) { | 159 handleSsidEditKeydown_: function(e) { |
| 155 if (e.target == this.ssidEdit && | 160 if (e.target == this.ssidEdit && |
| 156 e.keyIdentifier == 'Enter') { | 161 e.keyIdentifier == 'Enter') { |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 event.target == item.rememberCheckbox.nextElementSibling || | 352 event.target == item.rememberCheckbox.nextElementSibling || |
| 348 event.target == item.ssidEdit || | 353 event.target == item.ssidEdit || |
| 349 event.target == item.passwordEdit) { | 354 event.target == item.passwordEdit) { |
| 350 return; | 355 return; |
| 351 } | 356 } |
| 352 } | 357 } |
| 353 | 358 |
| 354 Menu.prototype.onClick_.call(this, event, item); | 359 Menu.prototype.onClick_.call(this, event, item); |
| 355 }, | 360 }, |
| 356 }; | 361 }; |
| OLD | NEW |