| 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 wrapping cr-network-list including the | 6 * @fileoverview Polymer element wrapping cr-network-list including the |
| 7 * networkingPrivate calls to populate it. | 7 * networkingPrivate calls to populate it. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 Polymer({ | 10 Polymer({ |
| 11 is: 'cr-network-select', | 11 is: 'cr-network-select', |
| 12 | 12 |
| 13 behaviors: [I18nBehavior], |
| 14 |
| 13 properties: { | 15 properties: { |
| 14 /** | 16 /** |
| 15 * Network state for the active network. | 17 * Network state for the active network. |
| 16 * @type {?CrOnc.NetworkStateProperties} | 18 * @type {?CrOnc.NetworkStateProperties} |
| 17 */ | 19 */ |
| 18 activeNetworkState: Object, | 20 activeNetworkState: Object, |
| 19 | 21 |
| 20 /** | 22 /** |
| 21 * If true, the element includes an 'expand' button that toggles the | 23 * If true, the element includes an 'expand' button that toggles the |
| 22 * expanded state of the network list. | 24 * expanded state of the network list. |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 193 |
| 192 if (state.ConnectionState != CrOnc.ConnectionState.NOT_CONNECTED) | 194 if (state.ConnectionState != CrOnc.ConnectionState.NOT_CONNECTED) |
| 193 return; | 195 return; |
| 194 | 196 |
| 195 chrome.networkingPrivate.startConnect(state.GUID, function() { | 197 chrome.networkingPrivate.startConnect(state.GUID, function() { |
| 196 var lastError = chrome.runtime.lastError; | 198 var lastError = chrome.runtime.lastError; |
| 197 if (lastError && lastError != 'connecting') | 199 if (lastError && lastError != 'connecting') |
| 198 console.error('networkingPrivate.startConnect error: ' + lastError); | 200 console.error('networkingPrivate.startConnect error: ' + lastError); |
| 199 }); | 201 }); |
| 200 }, | 202 }, |
| 203 |
| 204 getExpandA11yText_: function() { |
| 205 return this.i18n('networkExpandA11yLabel'); |
| 206 }, |
| 201 }); | 207 }); |
| OLD | NEW |