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

Unified Diff: content/browser/media/capture/web_contents_tracker.cc

Issue 2859223005: Tab Capture: Set size before changing target RWHV (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698