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

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

Issue 14134007: NetworkPortalDetector/NetworkStateInformer: Switch over to use NetworkStateHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 Network drop-down implementation. 6 * @fileoverview Network drop-down implementation.
7 */ 7 */
8 8
9 cr.define('cr.ui', function() { 9 cr.define('cr.ui', function() {
10 /** 10 /**
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (DropDown.activeElementId_) 381 if (DropDown.activeElementId_)
382 $(DropDown.activeElementId_).setTitle(title, icon); 382 $(DropDown.activeElementId_).setTitle(title, icon);
383 }; 383 };
384 384
385 /** 385 /**
386 * Activates network drop-down. Only one network drop-down 386 * Activates network drop-down. Only one network drop-down
387 * can be active at the same time. So activating new drop-down deactivates 387 * can be active at the same time. So activating new drop-down deactivates
388 * the previous one. 388 * the previous one.
389 * @param {string} elementId Id of network drop-down element. 389 * @param {string} elementId Id of network drop-down element.
390 * @param {boolean} isOobe Whether drop-down is used by an Oobe screen. 390 * @param {boolean} isOobe Whether drop-down is used by an Oobe screen.
391 * @param {integer} lastNetworkType Last active network type. Pass -1 if it
392 * isn't known.
393 */ 391 */
394 DropDown.show = function(elementId, isOobe, lastNetworkType) { 392 DropDown.show = function(elementId, isOobe) {
395 $(elementId).isShown = false; 393 $(elementId).isShown = false;
396 if (DropDown.activeElementId_ != elementId) { 394 if (DropDown.activeElementId_ != elementId) {
397 DropDown.activeElementId_ = elementId; 395 DropDown.activeElementId_ = elementId;
398 chrome.send('networkDropdownShow', [elementId, isOobe, lastNetworkType]); 396 chrome.send('networkDropdownShow', [elementId, isOobe]);
399 } 397 }
400 }; 398 };
401 399
402 /** 400 /**
403 * Deactivates network drop-down. Deactivating inactive drop-down does 401 * Deactivates network drop-down. Deactivating inactive drop-down does
404 * nothing. 402 * nothing.
405 * @param {string} elementId Id of network drop-down element. 403 * @param {string} elementId Id of network drop-down element.
406 */ 404 */
407 DropDown.hide = function(elementId) { 405 DropDown.hide = function(elementId) {
408 if (DropDown.activeElementId_ == elementId) { 406 if (DropDown.activeElementId_ == elementId) {
409 DropDown.activeElementId_ = ''; 407 DropDown.activeElementId_ = '';
410 chrome.send('networkDropdownHide'); 408 chrome.send('networkDropdownHide');
411 } 409 }
412 }; 410 };
413 411
414 /** 412 /**
415 * Refreshes network drop-down. Should be called on language change. 413 * Refreshes network drop-down. Should be called on language change.
416 */ 414 */
417 DropDown.refresh = function() { 415 DropDown.refresh = function() {
418 chrome.send('networkDropdownRefresh'); 416 chrome.send('networkDropdownRefresh');
419 }; 417 };
420 418
421 return { 419 return {
422 DropDown: DropDown 420 DropDown: DropDown
423 }; 421 };
424 }); 422 });
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/proxy_config_service_impl.cc ('k') | chrome/browser/resources/chromeos/login/screen_error_message.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698