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

Side by Side Diff: content/browser/media/capture/aura_window_capture_machine.cc

Issue 2603533002: Tab (and AuraWindow) Capture: Capture refresh frame after Resume() (Closed)
Patch Set: Account for behavior change in unit tests. Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/media/capture/web_contents_video_capture_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/capture/aura_window_capture_machine.h" 5 #include "content/browser/media/capture/aura_window_capture_machine.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void AuraWindowCaptureMachine::Resume() { 110 void AuraWindowCaptureMachine::Resume() {
111 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, 111 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
112 base::Bind(&AuraWindowCaptureMachine::InternalResume, 112 base::Bind(&AuraWindowCaptureMachine::InternalResume,
113 base::Unretained(this))); 113 base::Unretained(this)));
114 } 114 }
115 115
116 void AuraWindowCaptureMachine::InternalResume() { 116 void AuraWindowCaptureMachine::InternalResume() {
117 DCHECK_CURRENTLY_ON(BrowserThread::UI); 117 DCHECK_CURRENTLY_ON(BrowserThread::UI);
118 DVLOG(1) << "Resuming frame capture and delivery."; 118 DVLOG(1) << "Resuming frame capture and delivery.";
119 frame_capture_active_ = true; 119 frame_capture_active_ = true;
120 // Whenever capture resumes, capture a refresh frame immediately to make sure
121 // no content updates are missing from the video stream.
122 MaybeCaptureForRefresh();
120 } 123 }
121 124
122 void AuraWindowCaptureMachine::Stop(const base::Closure& callback) { 125 void AuraWindowCaptureMachine::Stop(const base::Closure& callback) {
123 // Stops the capture machine asynchronously. 126 // Stops the capture machine asynchronously.
124 BrowserThread::PostTask( 127 BrowserThread::PostTask(
125 BrowserThread::UI, FROM_HERE, base::Bind( 128 BrowserThread::UI, FROM_HERE, base::Bind(
126 &AuraWindowCaptureMachine::InternalStop, 129 &AuraWindowCaptureMachine::InternalStop,
127 base::Unretained(this), 130 base::Unretained(this),
128 callback)); 131 callback));
129 } 132 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 Capture(timestamp); 440 Capture(timestamp);
438 } 441 }
439 442
440 void AuraWindowCaptureMachine::OnCompositingShuttingDown( 443 void AuraWindowCaptureMachine::OnCompositingShuttingDown(
441 ui::Compositor* compositor) { 444 ui::Compositor* compositor) {
442 DCHECK_CURRENTLY_ON(BrowserThread::UI); 445 DCHECK_CURRENTLY_ON(BrowserThread::UI);
443 compositor->RemoveAnimationObserver(this); 446 compositor->RemoveAnimationObserver(this);
444 } 447 }
445 448
446 } // namespace content 449 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/web_contents_video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698