| 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.exportPath('options'); | 5 cr.exportPath('options'); |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @typedef {{actionLinkText: (string|undefined), | 8 * @typedef {{actionLinkText: (string|undefined), |
| 9 * childUser: (boolean|undefined), | 9 * childUser: (boolean|undefined), |
| 10 * hasError: (boolean|undefined), | 10 * hasError: (boolean|undefined), |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 | 827 |
| 828 /** | 828 /** |
| 829 * Shows the given section. | 829 * Shows the given section. |
| 830 * @param {HTMLElement} section The section to be shown. | 830 * @param {HTMLElement} section The section to be shown. |
| 831 * @param {HTMLElement} container The container for the section. Must be | 831 * @param {HTMLElement} container The container for the section. Must be |
| 832 * inside of |section|. | 832 * inside of |section|. |
| 833 * @param {boolean} animate Indicate if the expansion should be animated. | 833 * @param {boolean} animate Indicate if the expansion should be animated. |
| 834 * @private | 834 * @private |
| 835 */ | 835 */ |
| 836 showSection_: function(section, container, animate) { | 836 showSection_: function(section, container, animate) { |
| 837 if (section == $('advanced-settings') && |
| 838 !loadTimeData.getBoolean('allowAdvancedSettings')) { |
| 839 return; |
| 840 } |
| 837 // Delay starting the transition if animating so that hidden change will | 841 // Delay starting the transition if animating so that hidden change will |
| 838 // be processed. | 842 // be processed. |
| 839 if (animate) { | 843 if (animate) { |
| 840 this.animatedSectionHeightChange_(section, container, true); | 844 this.animatedSectionHeightChange_(section, container, true); |
| 841 } else { | 845 } else { |
| 842 section.hidden = false; | 846 section.hidden = false; |
| 843 section.style.height = 'auto'; | 847 section.style.height = 'auto'; |
| 844 } | 848 } |
| 845 }, | 849 }, |
| 846 | 850 |
| (...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2245 } | 2249 } |
| 2246 button.textContent = loadTimeData.getString(strId); | 2250 button.textContent = loadTimeData.getString(strId); |
| 2247 }; | 2251 }; |
| 2248 } | 2252 } |
| 2249 | 2253 |
| 2250 // Export | 2254 // Export |
| 2251 return { | 2255 return { |
| 2252 BrowserOptions: BrowserOptions | 2256 BrowserOptions: BrowserOptions |
| 2253 }; | 2257 }; |
| 2254 }); | 2258 }); |
| OLD | NEW |