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

Unified Diff: third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js

Issue 1140393002: Update more-routing for md-settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js b/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
index 7a5ea6abed4b0e5578a9b86e3ab8c8dd62bb0110..549aadf39b19c50ccce58ec0bf12897f653750a3 100644
--- a/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
+++ b/third_party/polymer/v0_8/components-chromium/more-routing/more-route-extracted.js
@@ -143,22 +143,23 @@
_observeRoute: function() {
// TODO(nevir) https://github.com/Polymore/more-routing/issues/24
- if (this._routeObserver) this._routeObserver.close();
- if (this._paramObserver) this._paramObserver.close();
+ if (this._routeListener) {
+ this._routeListener.close();
+ this._routeListener = null;
+ }
+ if (this._paramListener) {
+ this._paramListener.close();
+ this._paramListener = null;
+ }
if (!this.route) return;
- this._routeObserver = new CompoundObserver();
- this._routeObserver.addPath(this.route, 'active');
- this._routeObserver.open(function() {
- this._setActive(this.route.active);
+ this._routeListener = this.route.__subscribe(function() {
+ this._setActive(this.route && this.route.active);
}.bind(this));
- this._paramObserver = new ObjectObserver(this.route.params);
- this._paramObserver.open(function(added, removed, changed, getOldValue) {
- var keys = Object.keys(added).concat(Object.keys(removed)).concat(Object.keys(changed));
- keys.forEach(function(key) {
- this.notifyPath('params.' + key, this.params[key]);
- }.bind(this));
+ this._paramListener = this.route.params.__subscribe(function(key, value) {
+ // https://github.com/Polymer/polymer/issues/1505
+ this.notifyPath('params.' + key, value);
}.bind(this));
},

Powered by Google App Engine
This is Rietveld 408576698