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

Unified Diff: chrome/browser/resources/settings/settings_page/main_page_behavior.js

Issue 2230753002: MD Settings: methods to get root pages and sections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/settings_page/main_page_behavior.js
diff --git a/chrome/browser/resources/settings/settings_page/main_page_behavior.js b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
index b1b31d65f94fdb1f079fe57c82c4d301d3aa31a0..214547e447aaab9b20e41aa91928669c11e3f30f 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -60,7 +60,7 @@ var MainPageBehaviorImpl = {
*/
tryTransitionToSection_: function() {
var currentRoute = settings.getCurrentRoute();
- var currentSection = this.getSection_(currentRoute.section);
+ var currentSection = this.getSection(currentRoute.section);
// If an animation is already playing, try finishing or canceling it.
if (this.currentAnimation_) {
@@ -225,7 +225,7 @@ var MainPageBehaviorImpl = {
function() {
// If the current section changes while we are waiting for the page to
// be ready, scroll to the newest requested section.
- var section = this.getSection_(settings.getCurrentRoute().section);
+ var section = this.getSection(settings.getCurrentRoute().section);
if (section)
section.scrollIntoView();
}.bind(this));
@@ -235,9 +235,8 @@ var MainPageBehaviorImpl = {
* Helper function to get a section from the local DOM.
* @param {string} section Section name of the element to get.
* @return {?SettingsSectionElement}
- * @private
*/
- getSection_: function(section) {
+ getSection: function(section) {
if (!section)
return null;
return /** @type {?SettingsSectionElement} */(

Powered by Google App Engine
This is Rietveld 408576698