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} */ |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 * Whether the list has been expanded. This is used to ensure the | 68 * Whether the list has been expanded. This is used to ensure the |
69 * iron-collapse section animates correctly. | 69 * iron-collapse section animates correctly. |
70 * @private | 70 * @private |
71 */ | 71 */ |
72 wasExpanded_: { | 72 wasExpanded_: { |
73 type: Boolean, | 73 type: Boolean, |
74 value: false, | 74 value: false, |
75 }, | 75 }, |
76 }, | 76 }, |
77 | 77 |
78 keyBindings: { | |
79 'enter': 'onDetailsTap_', | |
80 }, | |
dschuyler
2016/12/16 22:41:41
It's not clear to me why this is being removed. Is
stevenjb
2016/12/16 22:56:10
It's unwanted and is actually causing the button t
dschuyler
2016/12/17 01:13:54
It's good. I just wanted to ask in case it was a w
| |
81 | |
82 /** @private */ | 78 /** @private */ |
83 expandedChanged_: function() { | 79 expandedChanged_: function() { |
84 var type = this.deviceState ? this.deviceState.Type : ''; | 80 var type = this.deviceState ? this.deviceState.Type : ''; |
85 this.fire('expanded', {expanded: this.expanded_, type: type}); | 81 this.fire('expanded', {expanded: this.expanded_, type: type}); |
86 }, | 82 }, |
87 | 83 |
88 /** @private */ | 84 /** @private */ |
89 deviceStateChanged_: function() { | 85 deviceStateChanged_: function() { |
90 if (this.expanded_ && !this.deviceIsEnabled_()) | 86 if (this.expanded_ && !this.deviceIsEnabled_()) |
91 this.expanded_ = false; | 87 this.expanded_ = false; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 */ | 263 */ |
268 onDeviceEnabledTap_: function(event) { | 264 onDeviceEnabledTap_: function(event) { |
269 var deviceIsEnabled = this.deviceIsEnabled_(); | 265 var deviceIsEnabled = this.deviceIsEnabled_(); |
270 var type = this.deviceState ? this.deviceState.Type : ''; | 266 var type = this.deviceState ? this.deviceState.Type : ''; |
271 this.fire( | 267 this.fire( |
272 'device-enabled-toggled', {enabled: !deviceIsEnabled, type: type}); | 268 'device-enabled-toggled', {enabled: !deviceIsEnabled, type: type}); |
273 // Make sure this does not propagate to onDetailsTap_. | 269 // Make sure this does not propagate to onDetailsTap_. |
274 event.stopPropagation(); | 270 event.stopPropagation(); |
275 }, | 271 }, |
276 }); | 272 }); |
OLD | NEW |