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

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

Issue 2818593003: [CrOS Tether] Add tether network properties (battery percentage, carrier, and signal strength) to t… (Closed)
Patch Set: stevenjb@ comments. 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
« no previous file with comments | « no previous file | chromeos/BUILD.gn » ('j') | chromeos/network/network_type_pattern.cc » ('J')
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 a summary of network states 6 * @fileoverview Polymer element for displaying a summary of network states
7 * by type: Ethernet, WiFi, Cellular, WiMAX, and VPN. 7 * by type: Ethernet, WiFi, Cellular, WiMAX, and VPN.
8 */ 8 */
9 9
10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */ 10 /** @typedef {chrome.networkingPrivate.DeviceStateProperties} */
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 var activeNetworkStatesByType = 275 var activeNetworkStatesByType =
276 /** @type {!Map<string, !CrOnc.NetworkStateProperties>} */ (new Map); 276 /** @type {!Map<string, !CrOnc.NetworkStateProperties>} */ (new Map);
277 277
278 // Complete list of states by type. 278 // Complete list of states by type.
279 /** @type {!NetworkStateListObject} */ var newNetworkStateLists = { 279 /** @type {!NetworkStateListObject} */ var newNetworkStateLists = {
280 Ethernet: [], 280 Ethernet: [],
281 WiFi: [], 281 WiFi: [],
282 Cellular: [], 282 Cellular: [],
283 WiMAX: [], 283 WiMAX: [],
284 VPN: [], 284 VPN: [],
285 Tether: [],
stevenjb 2017/04/18 20:41:19 We shouldn't make this change by itself.
Kyle Horimoto 2017/04/18 21:58:39 Done.
285 }; 286 };
286 287
287 var firstConnectedNetwork = null; 288 var firstConnectedNetwork = null;
288 networkStates.forEach(function(networkState) { 289 networkStates.forEach(function(networkState) {
289 var type = networkState.Type; 290 var type = networkState.Type;
290 if (!activeNetworkStatesByType.has(type)) { 291 if (!activeNetworkStatesByType.has(type)) {
291 activeNetworkStatesByType.set(type, networkState); 292 activeNetworkStatesByType.set(type, networkState);
292 if (!firstConnectedNetwork && networkState.Type != CrOnc.Type.VPN && 293 if (!firstConnectedNetwork && networkState.Type != CrOnc.Type.VPN &&
293 networkState.ConnectionState == CrOnc.ConnectionState.CONNECTED) { 294 networkState.ConnectionState == CrOnc.ConnectionState.CONNECTED) {
294 firstConnectedNetwork = networkState; 295 firstConnectedNetwork = networkState;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 newActiveNetworkStates.push(state); 330 newActiveNetworkStates.push(state);
330 this.activeNetworkIds_.add(state.GUID); 331 this.activeNetworkIds_.add(state.GUID);
331 } 332 }
332 333
333 this.deviceStates = newDeviceStates; 334 this.deviceStates = newDeviceStates;
334 this.networkStateLists_ = newNetworkStateLists; 335 this.networkStateLists_ = newNetworkStateLists;
335 // Set activeNetworkStates last to rebuild the dom-repeat. 336 // Set activeNetworkStates last to rebuild the dom-repeat.
336 this.activeNetworkStates_ = newActiveNetworkStates; 337 this.activeNetworkStates_ = newActiveNetworkStates;
337 }, 338 },
338 }); 339 });
OLDNEW
« no previous file with comments | « no previous file | chromeos/BUILD.gn » ('j') | chromeos/network/network_type_pattern.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698