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

Unified Diff: third_party/polymer/v0_8/components/more-routing/more-route.html

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/more-routing/more-route.html
diff --git a/third_party/polymer/v0_8/components/more-routing/more-route.html b/third_party/polymer/v0_8/components/more-routing/more-route.html
index 2b6066070e471147b6cd9121ee52261d1ca94a1c..27dfa255ecab5bc82a6310ff2053fbf3bd5fc8f8 100644
--- a/third_party/polymer/v0_8/components/more-routing/more-route.html
+++ b/third_party/polymer/v0_8/components/more-routing/more-route.html
@@ -7,7 +7,6 @@ Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../observe-js/observe-js.html">
<link rel="import" href="routing.html">
<link rel="import" href="more-route-context-aware.html">
@@ -157,22 +156,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
_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