Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| index a3466a06728f0d90d5f9c40b17fdf6c67cb4c2d1..3ab6b50f04061c6bf1e2ddef0d170c99fdc97733 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLVideoElement.cpp |
| @@ -508,13 +508,9 @@ void HTMLVideoElement::MediaRemotingStarted() { |
| } |
| void HTMLVideoElement::MediaRemotingStopped() { |
| - // Early return because this was already called when media remoting was |
| - // disabled. |
| - if (media_remoting_status_ == MediaRemotingStatus::kDisabled) |
| - return; |
| - DCHECK(media_remoting_status_ == MediaRemotingStatus::kStarted); |
|
whywhat
2017/05/19 15:58:19
nit: could you leave a DCHECK that the status can
xjz
2017/05/22 21:56:03
Done.
|
| + if (media_remoting_status_ != MediaRemotingStatus::kDisabled) |
| + media_remoting_status_ = MediaRemotingStatus::kNotStarted; |
| DCHECK(remoting_interstitial_); |
| - media_remoting_status_ = MediaRemotingStatus::kNotStarted; |
| remoting_interstitial_->Hide(); |
| } |
| @@ -522,7 +518,6 @@ void HTMLVideoElement::DisableMediaRemoting() { |
| if (GetWebMediaPlayer()) |
| GetWebMediaPlayer()->RequestRemotePlaybackDisabled(true); |
| media_remoting_status_ = MediaRemotingStatus::kDisabled; |
|
whywhat
2017/05/19 15:58:19
Should this be set before requesting to disable re
xjz
2017/05/22 21:56:03
Done.
|
| - MediaRemotingStopped(); |
| } |
| } // namespace blink |