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
|
} |
}; |