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

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

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Fixes Created 5 years, 1 month 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/media_router.js
diff --git a/chrome/browser/resources/media_router/media_router.js b/chrome/browser/resources/media_router/media_router.js
index 0c55b88d95a858285a38a663d047ee9dc9df8218..fb720186684d4f68db4620811929e0c2f9fc8299 100644
--- a/chrome/browser/resources/media_router/media_router.js
+++ b/chrome/browser/resources/media_router/media_router.js
@@ -25,6 +25,7 @@ cr.define('media_router', function() {
container.addEventListener('close-button-click', onCloseDialogEvent);
container.addEventListener('close-dialog', onCloseDialogEvent);
container.addEventListener('close-route-click', onCloseRouteClick);
+ container.addEventListener('join-route-click', onJoinRouteClick);
container.addEventListener('create-route', onCreateRoute);
container.addEventListener('issue-action-click', onIssueActionClick);
container.addEventListener('report-sink-count', onSinkCountReported);
@@ -83,6 +84,18 @@ cr.define('media_router', function() {
}
/**
+ * Joins a route.
+ * Called when the user requests to join a media route.
+ *
+ * @param {{detail: {route: string}}} data
imcheng 2015/12/01 23:45:06 Update comment here: we are passing in a media_rou
matt.boetger 2015/12/03 01:19:21 Done.
+ * Parameters in |data|.detail:
+ * route - route ID.
+ */
+ function onJoinRouteClick(data) {
+ media_router.browserApi.joinRoute(data.detail.route);
+ }
+
+ /**
* Reports the current sink count.
* Called 3 seconds after the dialog is initially opened.
*

Powered by Google App Engine
This is Rietveld 408576698