| 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 and editing network proxy | 6 * @fileoverview Polymer element for displaying and editing network proxy |
| 7 * values. | 7 * values. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'network-proxy', | 10 is: 'network-proxy', |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 * Set to true while modifying proxy values so that an update does not | 124 * Set to true while modifying proxy values so that an update does not |
| 125 * override the edited values. | 125 * override the edited values. |
| 126 * @private {boolean} | 126 * @private {boolean} |
| 127 */ | 127 */ |
| 128 proxyModified_: false, | 128 proxyModified_: false, |
| 129 | 129 |
| 130 /** @protected settings.RouteObserverBehavior */ | 130 /** @protected settings.RouteObserverBehavior */ |
| 131 currentRouteChanged: function(newRoute) { | 131 currentRouteChanged: function(newRoute) { |
| 132 this.proxyModified_ = false; | 132 this.proxyModified_ = false; |
| 133 this.proxy_ = this.createDefaultProxySettings_(); | 133 this.proxy_ = this.createDefaultProxySettings_(); |
| 134 if (newRoute == settings.Route.NETWORK_DETAIL) | 134 if (newRoute == settings.routes.NETWORK_DETAIL) |
| 135 this.updateProxy_(); | 135 this.updateProxy_(); |
| 136 }, | 136 }, |
| 137 | 137 |
| 138 /** @private */ | 138 /** @private */ |
| 139 networkPropertiesChanged_: function() { | 139 networkPropertiesChanged_: function() { |
| 140 if (this.proxyModified_) | 140 if (this.proxyModified_) |
| 141 return; // Ignore update. | 141 return; // Ignore update. |
| 142 this.updateProxy_(); | 142 this.updateProxy_(); |
| 143 }, | 143 }, |
| 144 | 144 |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 /** @type {!SettingsCheckboxElement} */ (this.$.allowShared) | 488 /** @type {!SettingsCheckboxElement} */ (this.$.allowShared) |
| 489 .resetToPrefValue(); | 489 .resetToPrefValue(); |
| 490 this.$.confirmAllowSharedDialog.close(); | 490 this.$.confirmAllowSharedDialog.close(); |
| 491 }, | 491 }, |
| 492 | 492 |
| 493 /** @private */ | 493 /** @private */ |
| 494 onAllowSharedDialogClose_: function() { | 494 onAllowSharedDialogClose_: function() { |
| 495 cr.ui.focusWithoutInk(assert(this.$$('#allowShared'))); | 495 cr.ui.focusWithoutInk(assert(this.$$('#allowShared'))); |
| 496 }, | 496 }, |
| 497 }); | 497 }); |
| OLD | NEW |