Chromium Code Reviews| Index: chrome/browser/resources/settings/device_page/device_page.js |
| diff --git a/chrome/browser/resources/settings/device_page/device_page.js b/chrome/browser/resources/settings/device_page/device_page.js |
| index c416e15d41fbbd9bf275c9aea3bcb8dad1022837..9e4efee35b38511ea4d1b68f61f8fdea7d5f358d 100644 |
| --- a/chrome/browser/resources/settings/device_page/device_page.js |
| +++ b/chrome/browser/resources/settings/device_page/device_page.js |
| @@ -12,16 +12,10 @@ Polymer({ |
| behaviors: [ |
| I18nBehavior, |
| WebUIListenerBehavior, |
| + settings.RouteObserverBehavior, |
| ], |
| properties: { |
| - /** The current active route. */ |
| - currentRoute: { |
| - type: Object, |
| - notify: true, |
| - observers: 'currentRouteChanged_', |
| - }, |
| - |
| /** Preferences state. */ |
| prefs: { |
| type: Object, |
| @@ -119,8 +113,8 @@ Polymer({ |
| settings.navigateTo(settings.Route.DISPLAY); |
| }, |
| - /** @private */ |
| - currentRouteChanged_: function() { |
| + /** @protected */ |
|
Dan Beam
2016/08/05 18:25:18
can this be @override instead?
tommycli
2016/08/05 18:54:05
Unfortunately, no. RouteObserverBehavior is not de
|
| + currentRouteChanged: function() { |
| this.checkPointerSubpage_(); |
| }, |
| @@ -140,7 +134,7 @@ Polymer({ |
| */ |
| checkPointerSubpage_: function() { |
| if (!this.hasMouse_ && !this.hasTouchpad_ && |
| - this.currentRoute == settings.Route.POINTERS) { |
| + settings.getCurrentRoute() == settings.Route.POINTERS) { |
| this.$.pages.fire('subpage-back'); |
| } |
| }, |