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

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

Issue 1605133002: [Media Router] Handle route creation where resolved route is not for display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per imcheng@'s comments. Created 4 years, 11 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/media_router.js
diff --git a/chrome/browser/resources/media_router/media_router.js b/chrome/browser/resources/media_router/media_router.js
index f358ce789670cc811ef678f6225f072bb85aaf97..7a0535264b605208b56d8a6761e3e980fdf3fe92 100644
--- a/chrome/browser/resources/media_router/media_router.js
+++ b/chrome/browser/resources/media_router/media_router.js
@@ -47,6 +47,7 @@ cr.define('media_router', function() {
container.addEventListener('report-initial-action', onInitialAction);
container.addEventListener('report-initial-action-close',
onInitialActionClose);
+ container.addEventListener('report-route-creation', onReportRouteCreation);
container.addEventListener('report-sink-click-time',
onSinkClickTimeReported);
container.addEventListener('report-sink-count', onSinkCountReported);
@@ -219,6 +220,18 @@ cr.define('media_router', function() {
}
/**
+ * Reports whether or not the route creation was successful.
+ *
+ * @param {!Event} event
+ * Parameters in |event|.detail:
+ * success - whether or not the route creation was successful.
+ */
+ function onReportRouteCreation(event) {
+ var detail = event.detail;
+ media_router.browserApi.reportRouteCreation(detail.success);
+ }
+
+ /**
* Reports the initial state of the dialog after it is opened.
* Called after initial data is populated.
*

Powered by Google App Engine
This is Rietveld 408576698