Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: chrome/browser/resources/settings/internet_page/network_summary_item.js

Issue 2795353002: WebUI: For cr-dialog, handle Enter keys in paper-inputs. (Closed)
Patch Set: update tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698