summaryrefslogtreecommitdiffstats
path: root/extensions/renderer
diff options
context:
space:
mode:
authorimcheng <imcheng@chromium.org>2016-02-24 19:21:17 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-25 03:22:23 +0000
commitc9e4189c7f733ce0d4984f7295d7359a3fb894b4 (patch)
treefe0ee8c2369e28f2985b23e0e171bea25ade5cf2 /extensions/renderer
parent1462a929e00255654a06d3e905adc72ba1255ad5 (diff)
downloadchromium_src-c9e4189c7f733ce0d4984f7295d7359a3fb894b4.zip
chromium_src-c9e4189c7f733ce0d4984f7295d7359a3fb894b4.tar.gz
chromium_src-c9e4189c7f733ce0d4984f7295d7359a3fb894b4.tar.bz2
[Media Router] Fix JS error in media_router_bindings.js.
Also fix flipped if condition in presentation_dispatcher.cc. error was introduced in previous patch in crrev.com/1701143002. BUG=579360,574233,574234 Review URL: https://codereview.chromium.org/1731153003 Cr-Commit-Position: refs/heads/master@{#377485}
Diffstat (limited to 'extensions/renderer')
-rw-r--r--extensions/renderer/resources/media_router_bindings.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/renderer/resources/media_router_bindings.js b/extensions/renderer/resources/media_router_bindings.js
index 0b0bee0..ebb668c 100644
--- a/extensions/renderer/resources/media_router_bindings.js
+++ b/extensions/renderer/resources/media_router_bindings.js
@@ -130,7 +130,7 @@ define('media_router_bindings', [
function presentationConnectionCloseReasonToMojo_(reason) {
var PresentationConnectionCloseReason =
mediaRouterMojom.MediaRouter.PresentationConnectionCloseReason;
- switch (state) {
+ switch (reason) {
case 'error':
return PresentationConnectionCloseReason.CONNECTION_ERROR;
case 'closed':
@@ -392,7 +392,7 @@ define('media_router_bindings', [
MediaRouter.prototype.onPresentationConnectionClosed =
function(routeId, reason, message) {
this.service_.onPresentationConnectionClosed(
- routeId, presentationConnectionCloseReasonToMojo_(state), message);
+ routeId, presentationConnectionCloseReasonToMojo_(reason), message);
};
/**