| Index: chrome/browser/resources/options2/options_page.js
|
| diff --git a/chrome/browser/resources/options2/options_page.js b/chrome/browser/resources/options2/options_page.js
|
| index be86a1c16b1beffd1e220e8ccc3e27b26637721e..e169b41afdf8a78501b870a390b9786a6bd8965e 100644
|
| --- a/chrome/browser/resources/options2/options_page.js
|
| +++ b/chrome/browser/resources/options2/options_page.js
|
| @@ -404,15 +404,6 @@ cr.define('options', function() {
|
| };
|
|
|
| /**
|
| - * Updates managed banner visibility state based on the topmost page.
|
| - */
|
| - OptionsPage.updateManagedBannerVisibility = function() {
|
| - var topPage = this.getTopmostVisiblePage();
|
| - if (topPage)
|
| - topPage.updateManagedBannerVisibility();
|
| - };
|
| -
|
| - /**
|
| * Shows the tab contents for the given navigation tab.
|
| * @param {!Element} tab The tab that the user clicked.
|
| */
|
| @@ -907,43 +898,6 @@ cr.define('options', function() {
|
| initializePage: function() {},
|
|
|
| /**
|
| - * Updates managed banner visibility state. This function iterates over
|
| - * all input fields of a window and if any of these is marked as managed
|
| - * it triggers the managed banner to be visible. The banner can be enforced
|
| - * being on through the managed flag of this class but it can not be forced
|
| - * being off if managed items exist.
|
| - */
|
| - updateManagedBannerVisibility: function() {
|
| - var bannerDiv = $('managed-prefs-banner');
|
| -
|
| - var controlledByPolicy = false;
|
| - var controlledByExtension = false;
|
| - var inputElements = this.pageDiv.querySelectorAll('input[controlled-by]');
|
| - for (var i = 0, len = inputElements.length; i < len; i++) {
|
| - if (inputElements[i].controlledBy == 'policy')
|
| - controlledByPolicy = true;
|
| - else if (inputElements[i].controlledBy == 'extension')
|
| - controlledByExtension = true;
|
| - }
|
| - if (!controlledByPolicy && !controlledByExtension) {
|
| - bannerDiv.hidden = true;
|
| - } else {
|
| - bannerDiv.hidden = false;
|
| - var height = window.getComputedStyle(bannerDiv).height;
|
| - if (controlledByPolicy && !controlledByExtension) {
|
| - $('managed-prefs-text').textContent =
|
| - templateData.policyManagedPrefsBannerText;
|
| - } else if (!controlledByPolicy && controlledByExtension) {
|
| - $('managed-prefs-text').textContent =
|
| - templateData.extensionManagedPrefsBannerText;
|
| - } else if (controlledByPolicy && controlledByExtension) {
|
| - $('managed-prefs-text').textContent =
|
| - templateData.policyAndExtensionManagedPrefsBannerText;
|
| - }
|
| - }
|
| - },
|
| -
|
| - /**
|
| * Gets page visibility state.
|
| */
|
| get visible() {
|
| @@ -962,11 +916,6 @@ cr.define('options', function() {
|
|
|
| OptionsPage.updatePageFreezeStates();
|
|
|
| - // The managed prefs banner is global, so after any visibility change
|
| - // update it based on the topmost page, not necessarily this page
|
| - // (e.g., if an ancestor is made visible after a child).
|
| - OptionsPage.updateManagedBannerVisibility();
|
| -
|
| // A subpage was shown or hidden.
|
| if (!this.isOverlay && this.nestingLevel > 0)
|
| OptionsPage.updateDisplayForShowOrHideSubpage_();
|
|
|