| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 /** | 56 /** |
| 57 * Array of properties to pass to the property list. | 57 * Array of properties to pass to the property list. |
| 58 */ | 58 */ |
| 59 ipConfigFields_: { | 59 ipConfigFields_: { |
| 60 type: Array, | 60 type: Array, |
| 61 value: function() { | 61 value: function() { |
| 62 return [ | 62 return [ |
| 63 'ipv4.IPAddress', | 63 'ipv4.IPAddress', |
| 64 'ipv4.RoutingPrefix', | 64 'ipv4.RoutingPrefix', |
| 65 'ipv4.Gateway', | 65 'ipv4.Gateway', |
| 66 'ipv6.IPAddress' | 66 'ipv6.IPAddress', |
| 67 'ipv4.WebProxyAutoDiscoveryUrl' |
| 67 ]; | 68 ]; |
| 68 }, | 69 }, |
| 69 readOnly: true | 70 readOnly: true |
| 70 }, | 71 }, |
| 71 }, | 72 }, |
| 72 | 73 |
| 73 /** | 74 /** |
| 74 * Saved static IP configuration properties when switching to 'automatic'. | 75 * Saved static IP configuration properties when switching to 'automatic'. |
| 75 * @type {?CrOnc.IPConfigUIProperties} | 76 * @type {?CrOnc.IPConfigUIProperties} |
| 76 */ | 77 */ |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 var value = event.detail.value; | 199 var value = event.detail.value; |
| 199 console.debug('IP.onIPChanged: ' + field + ' -> ' + value); | 200 console.debug('IP.onIPChanged: ' + field + ' -> ' + value); |
| 200 // Note: |field| includes the 'ipv4.' prefix. | 201 // Note: |field| includes the 'ipv4.' prefix. |
| 201 this.set('ipConfig.' + field, value); | 202 this.set('ipConfig.' + field, value); |
| 202 this.fire('changed', { | 203 this.fire('changed', { |
| 203 field: 'StaticIPConfig', | 204 field: 'StaticIPConfig', |
| 204 value: this.getIPConfigProperties_(this.ipConfig.ipv4) | 205 value: this.getIPConfigProperties_(this.ipConfig.ipv4) |
| 205 }); | 206 }); |
| 206 }, | 207 }, |
| 207 }); | 208 }); |
| OLD | NEW |