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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_welcome.js

Issue 2663293002: MD WebUI: Networking polish in OOBE and Settings (Closed)
Patch Set: Rebase Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 material design OOBE. 6 * @fileoverview Polymer element for displaying material design OOBE.
7 */ 7 */
8 8
9 Polymer({ 9 Polymer({
10 is: 'oobe-welcome-md', 10 is: 'oobe-welcome-md',
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 value: [], 100 value: [],
101 }, 101 },
102 102
103 /** 103 /**
104 * If UI uses forced keyboard navigation. 104 * If UI uses forced keyboard navigation.
105 */ 105 */
106 highlightStrength: { 106 highlightStrength: {
107 type: String, 107 type: String,
108 value: '', 108 value: '',
109 }, 109 },
110
111 /**
112 * True when connected to a network.
113 * @private
114 */
115 isConnected_: {
116 type: Boolean,
117 value: false,
118 }
110 }, 119 },
111 120
112 /** @override */ 121 /** @override */
113 ready: function() { 122 ready: function() {
114 CrOncStrings = { 123 CrOncStrings = {
115 OncTypeCellular: loadTimeData.getString('OncTypeCellular'), 124 OncTypeCellular: loadTimeData.getString('OncTypeCellular'),
116 OncTypeEthernet: loadTimeData.getString('OncTypeEthernet'), 125 OncTypeEthernet: loadTimeData.getString('OncTypeEthernet'),
117 OncTypeVPN: loadTimeData.getString('OncTypeVPN'), 126 OncTypeVPN: loadTimeData.getString('OncTypeVPN'),
118 OncTypeWiFi: loadTimeData.getString('OncTypeWiFi'), 127 OncTypeWiFi: loadTimeData.getString('OncTypeWiFi'),
119 OncTypeWiMAX: loadTimeData.getString('OncTypeWiMAX'), 128 OncTypeWiMAX: loadTimeData.getString('OncTypeWiMAX'),
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 /** 298 /**
290 * This is called when network setup is done. 299 * This is called when network setup is done.
291 * 300 *
292 * @private 301 * @private
293 */ 302 */
294 onSelectedNetworkConnected_: function() { 303 onSelectedNetworkConnected_: function() {
295 chrome.send('login.NetworkScreen.userActed', ['continue']); 304 chrome.send('login.NetworkScreen.userActed', ['continue']);
296 }, 305 },
297 306
298 /** 307 /**
299 * This gets called when a network enters the 'Connected' state. 308 * This gets called whenever the default network changes.
300 * 309 * @param {!{detail: ?CrOnc.NetworkStateProperties}} event
301 * @param {!{detail: !CrOnc.NetworkStateProperties}} event
302 * @private 310 * @private
303 */ 311 */
304 onNetworkConnected_: function(event) { 312 onDefaultNetworkChanged_: function(event) {
305 var state = event.detail; 313 var state = event.detail;
306 if (state.GUID != this.networkLastSelectedGuid_) 314 this.isConnected_ =
315 !!state && state.ConnectionState == CrOnc.ConnectionState.CONNECTED;
316 if (!state || state.GUID != this.networkLastSelectedGuid_)
307 return; 317 return;
308 318
309 // Duplicate asynchronous event may be delivered to some other screen, 319 // Duplicate asynchronous event may be delivered to some other screen,
310 // so disable it. 320 // so disable it.
311 this.networkLastSelectedGuid_ = ''; 321 this.networkLastSelectedGuid_ = '';
312 this.onSelectedNetworkConnected_(); 322 this.onSelectedNetworkConnected_();
313 }, 323 },
314 324
315 /** 325 /**
316 * This is called when user taps on network entry in networks list. 326 * This is called when user taps on network entry in networks list.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 * @private 459 * @private
450 */ 460 */
451 onTimezoneSelected_: function(event) { 461 onTimezoneSelected_: function(event) {
452 var item = event.detail; 462 var item = event.detail;
453 if (!item) 463 if (!item)
454 return; 464 return;
455 465
456 this.screen.onTimezoneSelected_(item.value); 466 this.screen.onTimezoneSelected_(item.value);
457 }, 467 },
458 }); 468 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698