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

Unified Diff: chrome/browser/resources/chromeos/login/network_dropdown.js

Issue 8681029: [cros] Make disconnected icons used by network drop-down and network button consistent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: default Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/network_dropdown.js
diff --git a/chrome/browser/resources/chromeos/login/network_dropdown.js b/chrome/browser/resources/chromeos/login/network_dropdown.js
index 4a07368cf92e9b984f1e3e6383f44893496303e6..a03e6127d195afeac2369400a793482f0b1c7bfc 100644
--- a/chrome/browser/resources/chromeos/login/network_dropdown.js
+++ b/chrome/browser/resources/chromeos/login/network_dropdown.js
@@ -369,25 +369,30 @@ cr.define('cr.ui', function() {
};
/**
- * Activates or deactivates network drop-down. Only one network drop-down
+ * Activates network drop-down. Only one network drop-down
* can be active at the same time. So activating new drop-down deactivates
- * the previous one. Deactivating not active drop-down does nothing.
+ * the previous one.
* @param {string} element_id Id of the element which is network drop-down.
whywhat 2011/11/29 07:58:06 Should be named "elementId" Would "Id of network d
altimofeev 2011/11/29 17:10:46 Done.
- * @param {boolean} isActive Is drop-down active?
- * @param {boolean} isOobe Is dropdown placed on an OOBE screen.
+ * @param {boolean} isOobe Whether drop-down is used by an Oobe screen.
+ * @param {integer} last Last active network type.
whywhat 2011/11/29 07:58:06 Could you rename it to smth less general? i.e. las
altimofeev 2011/11/29 17:10:46 Done.
*/
- DropDown.setActive = function(elementId, isActive, isOobe) {
- if (isActive) {
- $(elementId).isShown = false;
- if (DropDown.activeElementId_ != elementId) {
- DropDown.activeElementId_ = elementId;
- chrome.send('networkDropdownShow', [elementId, isOobe]);
- }
- } else {
- if (DropDown.activeElementId_ == elementId) {
- DropDown.activeElementId_ = '';
- chrome.send('networkDropdownHide', []);
- }
+ DropDown.show = function(elementId, isOobe, last) {
+ $(elementId).isShown = false;
+ if (DropDown.activeElementId_ != elementId) {
+ DropDown.activeElementId_ = elementId;
+ chrome.send('networkDropdownShow', [elementId, isOobe, last]);
+ }
+ };
+
+ /**
+ * Deactivates network drop-down. Deactivating not active drop-down does
whywhat 2011/11/29 07:58:06 not active -> inactive
altimofeev 2011/11/29 17:10:46 Done.
+ * nothing.
+ * @param {string} element_id Id of the element which is network drop-down.
whywhat 2011/11/29 07:58:06 Ditto about comment and name
altimofeev 2011/11/29 17:10:46 Done.
+ */
+ DropDown.hide = function(elementId) {
+ if (DropDown.activeElementId_ == elementId) {
+ DropDown.activeElementId_ = '';
+ chrome.send('networkDropdownHide', []);
whywhat 2011/11/29 07:58:06 nit: I thought you don't need to specify [] explic
altimofeev 2011/11/29 17:10:46 You are right, they are not obligatory. But I thin
}
};

Powered by Google App Engine
This is Rietveld 408576698