| 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 ///////////////////////////////////////////////////////////////////////////// | 6 ///////////////////////////////////////////////////////////////////////////// |
| 7 // OptionsPage class: | 7 // OptionsPage class: |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Base class for options page. | 10 * Base class for options page. |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 controlledByExtension = true; | 689 controlledByExtension = true; |
| 690 } | 690 } |
| 691 | 691 |
| 692 if (!controlledByPolicy && !controlledByExtension) { | 692 if (!controlledByPolicy && !controlledByExtension) { |
| 693 this.pageDiv.classList.remove('showing-banner'); | 693 this.pageDiv.classList.remove('showing-banner'); |
| 694 } else { | 694 } else { |
| 695 this.pageDiv.classList.add('showing-banner'); | 695 this.pageDiv.classList.add('showing-banner'); |
| 696 | 696 |
| 697 var text = bannerDiv.querySelector('.managed-prefs-text'); | 697 var text = bannerDiv.querySelector('.managed-prefs-text'); |
| 698 if (controlledByPolicy && !controlledByExtension) { | 698 if (controlledByPolicy && !controlledByExtension) { |
| 699 text.textContent = templateData.policyManagedPrefsBannerText; | 699 text.textContent = |
| 700 loadTimeData.getString('policyManagedPrefsBannerText'); |
| 700 } else if (!controlledByPolicy && controlledByExtension) { | 701 } else if (!controlledByPolicy && controlledByExtension) { |
| 701 text.textContent = templateData.extensionManagedPrefsBannerText; | 702 text.textContent = |
| 703 loadTimeData.getString('extensionManagedPrefsBannerText'); |
| 702 } else if (controlledByPolicy && controlledByExtension) { | 704 } else if (controlledByPolicy && controlledByExtension) { |
| 703 text.textContent = | 705 text.textContent = loadTimeData.getString( |
| 704 templateData.policyAndExtensionManagedPrefsBannerText; | 706 'policyAndExtensionManagedPrefsBannerText'); |
| 705 } | 707 } |
| 706 } | 708 } |
| 707 }, | 709 }, |
| 708 | 710 |
| 709 /** | 711 /** |
| 710 * Gets the container div for this page if it is an overlay. | 712 * Gets the container div for this page if it is an overlay. |
| 711 * @type {HTMLElement} | 713 * @type {HTMLElement} |
| 712 */ | 714 */ |
| 713 get container() { | 715 get container() { |
| 714 assert(this.isOverlay); | 716 assert(this.isOverlay); |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 canShowPage: function() { | 877 canShowPage: function() { |
| 876 return true; | 878 return true; |
| 877 }, | 879 }, |
| 878 }; | 880 }; |
| 879 | 881 |
| 880 // Export | 882 // Export |
| 881 return { | 883 return { |
| 882 OptionsPage: OptionsPage | 884 OptionsPage: OptionsPage |
| 883 }; | 885 }; |
| 884 }); | 886 }); |
| OLD | NEW |