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

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 1133853003: Media Router: Replace sink custom elements with core/paper elements. (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: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index 7d1ec51be0fa81bf963e890649adae7d82f2231a..fde715fc4d3dd9326a7830d9ae57221b8fd96e23 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -261,17 +261,16 @@ Polymer('media-router-container', {
},
/**
- * Called when an on-sink-click event bubbles up. Updates |currentRoute_|.
+ * Called when a sink is clicked. Updates |currentRoute_|.
*
- * @param {{detail: {route: ?media_router.Route, sink: !media_router.Sink}}}
- * data The information passed up with the event.
- * Parameters in |data|.detail:
- * route - The existing route associated with |sink|.
- * sink - The sink that was clicked.
+ * @param {!Event} event The event object.
+ * @param {Object} detail The details of the event.
+ * @param {!Element} sender Reference to clicked node.
*/
- onSinkClick: function(data) {
- this.currentRoute_ = data.detail.route;
- this.maybeCreateRoute(data.detail.sink, this.currentRoute_);
+ onSinkClick: function(event, detail, sender) {
+ var clickedSink = event.target.templateInstance.model.sink;
+ this.currentRoute_ = this.routeMap_[this.sinkToRouteMap_[clickedSink.id]];
+ this.maybeCreateRoute(clickedSink, this.currentRoute_);
},
/**

Powered by Google App Engine
This is Rietveld 408576698