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

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

Issue 2210933004: Settings Router Refactor: Kill settings-router. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge 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 e0fcbd67222d8a11e1d8d8a4dcbdadc488fbbbd2..ce711bfe13144e64092d39b4ec800812d6d58b02 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.js
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.js
@@ -243,15 +243,6 @@ var MainPageBehavior = [
* @polymerBehavior RoutableBehavior
*/
var RoutableBehaviorImpl = {
- properties: {
- /** Contains the current route. */
- currentRoute: {
- type: Object,
- notify: true,
- observer: 'currentRouteChanged_',
- },
- },
-
/** @private */
scrollToSection_: function() {
doWhenReady(
@@ -261,12 +252,12 @@ var RoutableBehaviorImpl = {
function() {
// If the current section changes while we are waiting for the page to
// be ready, scroll to the newest requested section.
- this.getSection_(this.currentRoute.section).scrollIntoView();
+ this.getSection_(settings.getCurrentRoute().section).scrollIntoView();
}.bind(this));
},
/** @private */
- currentRouteChanged_: function(newRoute, oldRoute) {
+ currentRouteChanged: function(newRoute, oldRoute) {
var newRouteIsSubpage = newRoute && newRoute.subpage.length;
var oldRouteIsSubpage = oldRoute && oldRoute.subpage.length;
@@ -316,5 +307,6 @@ var RoutableBehaviorImpl = {
/** @polymerBehavior */
var RoutableBehavior = [
MainPageBehavior,
+ settings.RouteObserverBehavior,
RoutableBehaviorImpl
];

Powered by Google App Engine
This is Rietveld 408576698