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

Unified Diff: third_party/polymer/v0_8/components/more-routing/more-route-selection.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-selection.html
diff --git a/third_party/polymer/v0_8/components/more-routing/more-route-selection.html b/third_party/polymer/v0_8/components/more-routing/more-route-selection.html
index 1afdd56e4026e1c3ad98f554ab04cc5fbb408707..04e292fde981140ba97057b4c12b85637d97a1a5 100644
--- a/third_party/polymer/v0_8/components/more-routing/more-route-selection.html
+++ b/third_party/polymer/v0_8/components/more-routing/more-route-selection.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="more-route-context-aware.html">
<link rel="import" href="route.html">
@@ -118,15 +117,15 @@ TODO(nevir): Document.
* Tracks changes to the routes.
*/
_observeRoutes: function() {
- if (this._observer) {
- this._observer.close();
- }
- // TODO(nevir): https://github.com/Polymore/more-routing/issues/24
- this._observer = new CompoundObserver();
- for (var i = 0, routeInfo; routeInfo = this._routeInfo[i]; i++) {
- this._observer.addPath(routeInfo.model, 'active');
+ if (this._routeListeners) {
+ for (var i = 0, listener; listener = this._routeListeners[i]; i++) {
+ listener.close();
+ }
}
- this._observer.open(this._evaluate.bind(this));
+
+ this._routeListeners = this._routeInfo.map(function(routeInfo) {
+ return routeInfo.model.__subscribe(this._evaluate.bind(this));
+ }.bind(this));
},
_evaluate: function() {

Powered by Google App Engine
This is Rietveld 408576698