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

Issue 2408143004: Bug fix: stop mirroring session when tab is closed. (Closed)

Created:
4 years, 2 months ago by xjz
Modified:
4 years, 2 months ago
Reviewers:
mcasas, miu
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, posciak+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, mcasas+watch+vc_chromium.org, miu+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Bug fix: stop mirroring session when tab is closed. Fix bug caused by cl: https://codereview.chromium.org/2365223002. |running_callback_| is used as a callback when status changes, and should not be reset if the capture is successfully started. BUG=655240 Committed: https://crrev.com/a8e9c8591d8d5026c32d6d93bf11f0ff5096eee9 Cr-Commit-Position: refs/heads/master@{#425124}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed comments. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -5 lines) Patch
M content/renderer/media/media_stream_video_capturer_source.cc View 1 2 chunks +4 lines, -5 lines 6 comments Download

Messages

Total messages: 25 (17 generated)
xjz
PTAL
4 years, 2 months ago (2016-10-12 20:25:04 UTC) #6
mcasas
lgtm with a nit https://codereview.chromium.org/2408143004/diff/20001/content/renderer/media/media_stream_video_capturer_source.cc File content/renderer/media/media_stream_video_capturer_source.cc (right): https://codereview.chromium.org/2408143004/diff/20001/content/renderer/media/media_stream_video_capturer_source.cc#newcode237 content/renderer/media/media_stream_video_capturer_source.cc:237: RunningCallback running_callback_; nit: the name ...
4 years, 2 months ago (2016-10-13 13:48:44 UTC) #9
xjz
Thanks for review! https://codereview.chromium.org/2408143004/diff/20001/content/renderer/media/media_stream_video_capturer_source.cc File content/renderer/media/media_stream_video_capturer_source.cc (right): https://codereview.chromium.org/2408143004/diff/20001/content/renderer/media/media_stream_video_capturer_source.cc#newcode237 content/renderer/media/media_stream_video_capturer_source.cc:237: RunningCallback running_callback_; On 2016/10/13 13:48:43, mcasas ...
4 years, 2 months ago (2016-10-13 18:11:39 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2408143004/60001
4 years, 2 months ago (2016-10-13 19:17:05 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:60001)
4 years, 2 months ago (2016-10-13 19:22:53 UTC) #20
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/a8e9c8591d8d5026c32d6d93bf11f0ff5096eee9 Cr-Commit-Position: refs/heads/master@{#425124}
4 years, 2 months ago (2016-10-13 19:25:04 UTC) #22
miu
https://codereview.chromium.org/2408143004/diff/60001/content/renderer/media/media_stream_video_capturer_source.cc File content/renderer/media/media_stream_video_capturer_source.cc (right): https://codereview.chromium.org/2408143004/diff/60001/content/renderer/media/media_stream_video_capturer_source.cc#newcode369 content/renderer/media/media_stream_video_capturer_source.cc:369: // Not applicable to reporting on device start success/failure. ...
4 years, 2 months ago (2016-10-18 22:22:31 UTC) #24
xjz
4 years, 2 months ago (2016-10-19 18:12:09 UTC) #25
Message was sent while issue was closed.
Addressed miu@'s comments in the follow-up CL:
https://chromiumcodereview.appspot.com/2432373003.
PTAL

https://codereview.chromium.org/2408143004/diff/60001/content/renderer/media/...
File content/renderer/media/media_stream_video_capturer_source.cc (right):

https://codereview.chromium.org/2408143004/diff/60001/content/renderer/media/...
content/renderer/media/media_stream_video_capturer_source.cc:369: // Not
applicable to reporting on device start success/failure.
On 2016/10/18 22:22:30, miu wrote:
> nit: // Not applicable to reporting on device starts or errors.

Done.

https://codereview.chromium.org/2408143004/diff/60001/content/renderer/media/...
content/renderer/media/media_stream_video_capturer_source.cc:494: void
MediaStreamVideoCapturerSource::OnStarted(bool result) {
On 2016/10/18 22:22:30, miu wrote:
> The original bug was most likely caused because this method is mis-named (or
> maybe it was re-purposed but without also making a name change). Can you
please
> fix this?
> 
> Suggestion: void OnRunStateChanged(bool is_running)

Done.

https://codereview.chromium.org/2408143004/diff/60001/content/renderer/media/...
content/renderer/media/media_stream_video_capturer_source.cc:495:
OnStartDone(result ? MEDIA_DEVICE_OK : MEDIA_DEVICE_TRACK_START_FAILURE);
On 2016/10/18 22:22:30, miu wrote:
> This is also misleading, but I think there's more than a naming problem here.
It
> seems like this whole method should be:
> 
>   void MediaStreamVideoCapturerSource::OnRunStateChanged(bool is_running) {
>     if (is_capture_starting_) {
>       // Note: |is_capture_starting_| was set to true by StartSourceImpl().
>       OnStartDone(is_running ? MEDIA_DEVICE_OK :
> MEDIA_DEVICE_TRACK_START_FAILURE);
>       is_capture_starting_ = false;
>     } else if (!is_running) {
>       StopSource();
>     }
>   }

Done.

Powered by Google App Engine
This is Rietveld 408576698