| Index: content/browser/media/capture/web_contents_tracker.cc
|
| diff --git a/content/browser/media/capture/web_contents_tracker.cc b/content/browser/media/capture/web_contents_tracker.cc
|
| index 770cb1ede548f75d23e4ba55812cb6e440c3c7e2..32ba724170a10eb6b22031302e6adfbeab63c8fb 100644
|
| --- a/content/browser/media/capture/web_contents_tracker.cc
|
| +++ b/content/browser/media/capture/web_contents_tracker.cc
|
| @@ -107,10 +107,13 @@ void WebContentsTracker::OnPossibleTargetChange(bool force_callback_run) {
|
| void WebContentsTracker::MaybeDoCallback(bool was_still_tracking) {
|
| DCHECK(task_runner_->BelongsToCurrentThread());
|
|
|
| - if (!callback_.is_null())
|
| - callback_.Run(was_still_tracking);
|
| + // Notify of a size change just before notifying of a new target. This allows
|
| + // the downstream implementation to capture the first frame from the new
|
| + // target at the correct resolution. http://crbug.com/704277
|
| if (was_still_tracking)
|
| MaybeDoResizeCallback();
|
| + if (!callback_.is_null())
|
| + callback_.Run(was_still_tracking);
|
| }
|
|
|
| void WebContentsTracker::MaybeDoResizeCallback() {
|
|
|