| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @fileoverview Polymer element for displaying the IP Config properties for | 6 * @fileoverview Polymer element for displaying the IP Config properties for |
| 7 * a network state. TODO(stevenjb): Allow editing of static IP configurations | 7 * a network state. TODO(stevenjb): Allow editing of static IP configurations |
| 8 * when 'editable' is true. | 8 * when 'editable' is true. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 * @param {!{detail: {field: string, value: string}}} event The | 195 * @param {!{detail: {field: string, value: string}}} event The |
| 196 * network-property-list change event. | 196 * network-property-list change event. |
| 197 * @private | 197 * @private |
| 198 */ | 198 */ |
| 199 onIPChange_: function(event) { | 199 onIPChange_: function(event) { |
| 200 if (!this.ipConfig_) | 200 if (!this.ipConfig_) |
| 201 return; | 201 return; |
| 202 var field = event.detail.field; | 202 var field = event.detail.field; |
| 203 var value = event.detail.value; | 203 var value = event.detail.value; |
| 204 // Note: |field| includes the 'ipv4.' prefix. | 204 // Note: |field| includes the 'ipv4.' prefix. |
| 205 this.set('ipConfig.' + field, value); | 205 this.set('ipConfig_.' + field, value); |
| 206 this.fire('ip-change', { | 206 this.fire('ip-change', { |
| 207 field: 'StaticIPConfig', | 207 field: 'StaticIPConfig', |
| 208 value: this.getIPConfigProperties_(this.ipConfig_.ipv4) | 208 value: this.getIPConfigProperties_(this.ipConfig_.ipv4) |
| 209 }); | 209 }); |
| 210 }, | 210 }, |
| 211 }); | 211 }); |
| OLD | NEW |