| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |