| Index: ui/file_manager/video_player/js/cast/cast_video_element.js
|
| diff --git a/ui/file_manager/video_player/js/cast/cast_video_element.js b/ui/file_manager/video_player/js/cast/cast_video_element.js
|
| index 0a2a930615edd7be4dabb81a959c3b2714199f0f..bdc5e217619d50657154dc59e1bf57b351a0222d 100644
|
| --- a/ui/file_manager/video_player/js/cast/cast_video_element.js
|
| +++ b/ui/file_manager/video_player/js/cast/cast_video_element.js
|
| @@ -120,8 +120,8 @@ CastVideoElement.prototype = {
|
| if (!this.castMedia_)
|
| return true;
|
|
|
| - return !this.playInProgress &&
|
| - this.castMedia_.idleReason === chrome.cast.media.IdleReason.FINISHED;
|
| + return !this.playInProgress &&
|
| + this.castMedia_.idleReason === chrome.cast.media.IdleReason.FINISHED;
|
| },
|
|
|
| /**
|
| @@ -329,16 +329,16 @@ CastVideoElement.prototype = {
|
| var message = JSON.parse(messageAsJson);
|
| if (message['message'] === 'request-token') {
|
| if (message['previousToken'] === this.token_) {
|
| - this.mediaManager_.getToken(true).then(function(token) {
|
| - this.token_ = token;
|
| - this.sendMessage_({message: 'push-token', token: token});
|
| - // TODO(yoshiki): Revokes the previous token.
|
| - }.bind(this)).catch(function(error) {
|
| - // Send an empty token as an error.
|
| - this.sendMessage_({message: 'push-token', token: ''});
|
| - // TODO(yoshiki): Revokes the previous token.
|
| - console.error(error.stack || error);
|
| - });
|
| + this.mediaManager_.getToken(true).then(function(token) {
|
| + this.token_ = token;
|
| + this.sendMessage_({message: 'push-token', token: token});
|
| + // TODO(yoshiki): Revokes the previous token.
|
| + }.bind(this)).catch(function(error) {
|
| + // Send an empty token as an error.
|
| + this.sendMessage_({message: 'push-token', token: ''});
|
| + // TODO(yoshiki): Revokes the previous token.
|
| + console.error(error.stack || error);
|
| + });
|
| } else {
|
| console.error(
|
| 'New token is requested, but the previous token mismatches.');
|
|
|