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

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

Issue 2729693002: MD Settings: Internet: Hide add connection UI when WiFi is disabled (Closed)
Patch Set: Closure Created 3 years, 9 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
« no previous file with comments | « chrome/browser/resources/settings/internet_page/internet_page.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 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 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */ 10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 /** 281 /**
282 * @param {!DeviceStateProperties} deviceState 282 * @param {!DeviceStateProperties} deviceState
283 * @param {!chrome.networkingPrivate.GlobalPolicy} globalPolicy 283 * @param {!chrome.networkingPrivate.GlobalPolicy} globalPolicy
284 * @return {boolean} 284 * @return {boolean}
285 * @private 285 * @private
286 */ 286 */
287 showAddButton_: function(deviceState, globalPolicy) { 287 showAddButton_: function(deviceState, globalPolicy) {
288 if (!deviceState || deviceState.Type != CrOnc.Type.WI_FI) 288 if (!deviceState || deviceState.Type != CrOnc.Type.WI_FI)
289 return false; 289 return false;
290 if (!this.deviceIsEnabled_(deviceState))
291 return false;
290 return this.allowAddConnection_(globalPolicy); 292 return this.allowAddConnection_(globalPolicy);
291 }, 293 },
292 294
293 /** @private */ 295 /** @private */
294 onAddButtonTap_: function() { 296 onAddButtonTap_: function() {
295 chrome.send('addNetwork', [this.deviceState.Type]); 297 chrome.send('addNetwork', [this.deviceState.Type]);
296 }, 298 },
297 299
298 /** 300 /**
299 * @param {!{model: 301 * @param {!{model:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 422
421 /** 423 /**
422 * @param {*} lhs 424 * @param {*} lhs
423 * @param {*} rhs 425 * @param {*} rhs
424 * @return {boolean} 426 * @return {boolean}
425 */ 427 */
426 isEqual_: function(lhs, rhs) { 428 isEqual_: function(lhs, rhs) {
427 return lhs === rhs; 429 return lhs === rhs;
428 }, 430 },
429 }); 431 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/internet_page/internet_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698