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

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

Issue 1403773002: Fix VPN connected logic in internet settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make closure happy Created 5 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/settings/internet_page/network_summary.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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} */
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 expandedChanged_: function() { 76 expandedChanged_: function() {
77 var type = this.deviceState ? this.deviceState.Type : ''; 77 var type = this.deviceState ? this.deviceState.Type : '';
78 this.fire('expanded', {expanded: this.expanded, type: type}); 78 this.fire('expanded', {expanded: this.expanded, type: type});
79 }, 79 },
80 80
81 /** 81 /**
82 * Polymer deviceState changed method. 82 * Polymer deviceState changed method.
83 */ 83 */
84 deviceStateChanged_: function() { 84 deviceStateChanged_: function() {
85 this.updateSelectable_(); 85 this.updateSelectable_();
86 if (!this.deviceIsEnabled_(this.deviceState)) 86 if (this.expanded && !this.deviceIsEnabled_(this.deviceState))
87 this.expanded = false; 87 this.expanded = false;
88 }, 88 },
89 89
90 /** 90 /**
91 * Polymer networkStateList changed method. 91 * Polymer networkStateList changed method.
92 */ 92 */
93 networkStateListChanged_: function() { 93 networkStateListChanged_: function() {
94 this.updateSelectable_(); 94 this.updateSelectable_();
95 }, 95 },
96 96
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 /** 222 /**
223 * Called whenever the 'selectable' state might change. 223 * Called whenever the 'selectable' state might change.
224 * @private 224 * @private
225 */ 225 */
226 updateSelectable_: function() { 226 updateSelectable_: function() {
227 var selectable = this.deviceIsEnabled_(this.deviceState); 227 var selectable = this.deviceIsEnabled_(this.deviceState);
228 this.$.details.classList.toggle('selectable', selectable); 228 this.$.details.classList.toggle('selectable', selectable);
229 }, 229 },
230 }); 230 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/internet_page/network_summary.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698