| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 information about WiFi, | 6 * @fileoverview Polymer element for displaying information about WiFi, |
| 7 * WiMAX, or virtual networks. | 7 * WiMAX, or virtual networks. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 }, | 445 }, |
| 446 | 446 |
| 447 /** | 447 /** |
| 448 * @param {!CrOnc.DeviceStateProperties|undefined} deviceState | 448 * @param {!CrOnc.DeviceStateProperties|undefined} deviceState |
| 449 * @param {!CrOnc.DeviceStateProperties|undefined} tetherDeviceState | 449 * @param {!CrOnc.DeviceStateProperties|undefined} tetherDeviceState |
| 450 * @return {boolean} | 450 * @return {boolean} |
| 451 * @private | 451 * @private |
| 452 */ | 452 */ |
| 453 tetherToggleIsEnabled_: function(deviceState, tetherDeviceState) { | 453 tetherToggleIsEnabled_: function(deviceState, tetherDeviceState) { |
| 454 return this.tetherToggleIsVisible_(deviceState, tetherDeviceState) && | 454 return this.tetherToggleIsVisible_(deviceState, tetherDeviceState) && |
| 455 this.enableToggleIsEnabled_(tetherDeviceState) && | 455 this.enableToggleIsEnabled_(tetherDeviceState) && |
| 456 tetherDeviceState.State != CrOnc.DeviceState.UNINITIALIZED; | 456 tetherDeviceState.State != CrOnc.DeviceState.UNINITIALIZED; |
| 457 }, | 457 }, |
| 458 | 458 |
| 459 /** | 459 /** |
| 460 * @param {!Event} event | 460 * @param {!Event} event |
| 461 * @private | 461 * @private |
| 462 */ | 462 */ |
| 463 onTetherEnabledTap_: function(event) { | 463 onTetherEnabledTap_: function(event) { |
| 464 this.fire('device-enabled-toggled', { | 464 this.fire('device-enabled-toggled', { |
| 465 enabled: !this.deviceIsEnabled_(this.tetherDeviceState), | 465 enabled: !this.deviceIsEnabled_(this.tetherDeviceState), |
| 466 type: CrOnc.Type.TETHER, | 466 type: CrOnc.Type.TETHER, |
| 467 }); | 467 }); |
| 468 event.stopPropagation(); | 468 event.stopPropagation(); |
| 469 }, | 469 }, |
| 470 | 470 |
| 471 /** | 471 /** |
| 472 * @param {*} lhs | 472 * @param {*} lhs |
| 473 * @param {*} rhs | 473 * @param {*} rhs |
| 474 * @return {boolean} | 474 * @return {boolean} |
| 475 */ | 475 */ |
| 476 isEqual_: function(lhs, rhs) { | 476 isEqual_: function(lhs, rhs) { |
| 477 return lhs === rhs; | 477 return lhs === rhs; |
| 478 }, | 478 }, |
| 479 }); | 479 }); |
| OLD | NEW |