OLD | NEW |
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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 | 7 |
8 // True if the synced account uses a custom passphrase. | 8 // True if the synced account uses a custom passphrase. |
9 var usePassphrase_ = false; | 9 var usePassphrase_ = false; |
10 | 10 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 else if (page == 'timeout') | 644 else if (page == 'timeout') |
645 this.showTimeoutPage_(); | 645 this.showTimeoutPage_(); |
646 }, | 646 }, |
647 | 647 |
648 /** | 648 /** |
649 * Changes the visibility of throbbers on this page. | 649 * Changes the visibility of throbbers on this page. |
650 * @param {boolean} visible Whether or not to set all throbber nodes | 650 * @param {boolean} visible Whether or not to set all throbber nodes |
651 * visible. | 651 * visible. |
652 */ | 652 */ |
653 setThrobbersVisible_: function(visible) { | 653 setThrobbersVisible_: function(visible) { |
654 var throbbers = document.getElementsByClassName('throbber'); | 654 var throbbers = this.pageDiv.getElementsByClassName('throbber'); |
655 for (var i = 0; i < throbbers.length; i++) | 655 for (var i = 0; i < throbbers.length; i++) |
656 throbbers[i].style.visibility = visible ? 'visible' : 'hidden'; | 656 throbbers[i].style.visibility = visible ? 'visible' : 'hidden'; |
657 }, | 657 }, |
658 | 658 |
659 /** | 659 /** |
660 * Reset the state of all descendant elements of a root element to their | 660 * Reset the state of all descendant elements of a root element to their |
661 * initial state. | 661 * initial state. |
662 * The initial state is specified by adding a class to the descendant | 662 * The initial state is specified by adding a class to the descendant |
663 * element in sync_setup_overlay.html. | 663 * element in sync_setup_overlay.html. |
664 * @param {HTMLElement} pageElementId The root page element id. | 664 * @param {HTMLElement} pageElementId The root page element id. |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 | 763 |
764 SyncSetupOverlay.showStopSyncingUI = function() { | 764 SyncSetupOverlay.showStopSyncingUI = function() { |
765 SyncSetupOverlay.getInstance().showStopSyncingUI_(); | 765 SyncSetupOverlay.getInstance().showStopSyncingUI_(); |
766 }; | 766 }; |
767 | 767 |
768 // Export | 768 // Export |
769 return { | 769 return { |
770 SyncSetupOverlay: SyncSetupOverlay | 770 SyncSetupOverlay: SyncSetupOverlay |
771 }; | 771 }; |
772 }); | 772 }); |
OLD | NEW |