| 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 network state for a specific | 6 * @fileoverview Polymer element for displaying the network state for a specific |
| 7 * type and a list of networks for that type. | 7 * type and a list of networks for that type. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */ | 10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */ |
| 11 var DeviceStateProperties; | 11 var DeviceStateProperties; |
| 12 | 12 |
| 13 Polymer({ | 13 Polymer({ |
| 14 is: 'network-summary-item', | 14 is: 'network-summary-item', |
| 15 | 15 |
| 16 behaviors: [Polymer.IronA11yKeysBehavior, I18nBehavior], | 16 behaviors: [I18nBehavior], |
| 17 | 17 |
| 18 properties: { | 18 properties: { |
| 19 /** | 19 /** |
| 20 * Device state for the network type. | 20 * Device state for the network type. |
| 21 * @type {!DeviceStateProperties|undefined} | 21 * @type {!DeviceStateProperties|undefined} |
| 22 */ | 22 */ |
| 23 deviceState: Object, | 23 deviceState: Object, |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Network state for the active network. | 26 * Network state for the active network. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 */ | 190 */ |
| 191 onDeviceEnabledTap_: function(event) { | 191 onDeviceEnabledTap_: function(event) { |
| 192 var deviceIsEnabled = this.deviceIsEnabled_(this.deviceState); | 192 var deviceIsEnabled = this.deviceIsEnabled_(this.deviceState); |
| 193 var type = this.deviceState ? this.deviceState.Type : ''; | 193 var type = this.deviceState ? this.deviceState.Type : ''; |
| 194 this.fire( | 194 this.fire( |
| 195 'device-enabled-toggled', {enabled: !deviceIsEnabled, type: type}); | 195 'device-enabled-toggled', {enabled: !deviceIsEnabled, type: type}); |
| 196 // Make sure this does not propagate to onDetailsTap_. | 196 // Make sure this does not propagate to onDetailsTap_. |
| 197 event.stopPropagation(); | 197 event.stopPropagation(); |
| 198 }, | 198 }, |
| 199 }); | 199 }); |
| OLD | NEW |