Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4818)

Unified Diff: chrome/browser/resources/settings/basic_page/basic_page.js

Issue 2852433003: MD Settings: Elim SettingsSubpageBrowsertest and SettingsPageVisibility (Closed)
Patch Set: Rebase + fix settings_main_test.js Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/basic_page/basic_page.js
diff --git a/chrome/browser/resources/settings/basic_page/basic_page.js b/chrome/browser/resources/settings/basic_page/basic_page.js
index d360e891f428705bfcc79d468745f7fb91989688..4032ade5091d750830b47e9b0c096be08ad0edb6 100644
--- a/chrome/browser/resources/settings/basic_page/basic_page.js
+++ b/chrome/browser/resources/settings/basic_page/basic_page.js
@@ -9,7 +9,7 @@
Polymer({
is: 'settings-basic-page',
- behaviors: [SettingsPageVisibility, MainPageBehavior],
+ behaviors: [MainPageBehavior],
properties: {
/** Preferences state. */
@@ -18,11 +18,9 @@ Polymer({
notify: true,
},
- showAndroidApps: Boolean,
-
/**
- * Dictionary defining page visibility.
- * @type {!GuestModePageVisibility}
+ * Dictionary defining page visibility. Controlled by settings-ui.
+ * @type {!PageVisibility|undefined}
*/
pageVisibility: Object,
@@ -134,6 +132,23 @@ Polymer({
});
},
+ /**
+ * @param {boolean|undefined} visibility
+ * @return {boolean}
+ * @private
+ */
+ showPage_: function(visibility) {
+ return visibility !== false;
+ },
+
+ /**
+ * @param {string} subpage
+ * @return {!Object}
+ */
+ getPageVisibility_: function(subpage) {
+ return /** @type {Object} */ (this.get(subpage, this.pageVisibility)) || {};
+ },
+
// <if expr="chromeos">
/**
* @return {boolean}
@@ -151,16 +166,6 @@ Polymer({
},
/**
- * @return {boolean}
- * @private
- */
- shouldShowAndroidApps_: function() {
- var visibility = /** @type {boolean|undefined} */ (
- this.get('pageVisibility.androidApps'));
- return this.showAndroidApps && this.showPage(visibility);
- },
-
- /**
* Hides everything but the newly expanded subpage.
* @private
*/
@@ -219,15 +224,6 @@ Polymer({
},
/**
- * @param {(boolean|undefined)} visibility
- * @return {boolean} True unless visibility is false.
- * @private
- */
- showAdvancedSettings_: function(visibility) {
- return visibility !== false;
- },
-
- /**
* @param {boolean} opened Whether the menu is expanded.
* @return {string} Icon name.
* @private

Powered by Google App Engine
This is Rietveld 408576698