Index: chrome/browser/resources/settings/settings_main/settings_main.js |
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js |
index 75daea44da83eb7a5e91e6f11fb9a2c469abc85b..ec4791304e0d5913d15b5271d6553e49570515c5 100644 |
--- a/chrome/browser/resources/settings/settings_main/settings_main.js |
+++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
@@ -57,6 +57,15 @@ Polymer({ |
type: Boolean, |
value: false, |
}, |
+ |
+ /** |
+ * Dictionary defining page visibility. |
+ * @type {Object} |
+ */ |
+ pageVisibility: { |
+ type: Object, |
+ value: function() { return {}; }, |
+ }, |
}, |
/** @override */ |
@@ -119,6 +128,10 @@ Polymer({ |
this.showBasicPage_ = this.showAdvancedToggle_ || newRoute.page == 'basic'; |
+ if (newRoute.page == 'advanced') |
michaelpg
2016/07/20 19:40:46
{} around multi-line if bodies
Moe
2016/07/21 18:27:32
Done.
|
+ assert(! /** @type {{hideAdvancedSettings: boolean}} */ |
michaelpg
2016/07/20 19:40:46
this cast isn't right: the thing in parens is a bo
Moe
2016/07/21 18:27:32
Done.
|
+ (this.pageVisibility.hideAdvancedSettings)); |
+ |
this.showAdvancedPage_ = |
(this.isAdvancedMenuOpen_ && this.showAdvancedToggle_) || |
newRoute.page == 'advanced'; |
@@ -147,6 +160,9 @@ Polymer({ |
* @param {string} query |
*/ |
searchContents: function(query) { |
+ assert(! /** @type {{hideToolbarSearchField: boolean}} */ |
michaelpg
2016/07/20 19:40:46
ditto
Moe
2016/07/21 18:27:32
took search related parts out.
|
+ (this.pageVisibility.hideToolbarSearchField)); |
+ |
this.ensureInDefaultSearchPage_(); |
// Trigger rendering of the basic and advanced pages and search once ready. |