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

Unified Diff: webrtc/modules/desktop_capture/desktop_capturer.h

Issue 2409833002: Remove DesktopRegion parameter in DesktopCapturer::Capture. (Closed)
Patch Set: Created 4 years, 2 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
Index: webrtc/modules/desktop_capture/desktop_capturer.h
diff --git a/webrtc/modules/desktop_capture/desktop_capturer.h b/webrtc/modules/desktop_capture/desktop_capturer.h
index 778c93c63a0e638d75a110be7fa57c237f565a29..be948dbb6a5d56d575694faf7ae54ca816517920 100644
--- a/webrtc/modules/desktop_capture/desktop_capturer.h
+++ b/webrtc/modules/desktop_capture/desktop_capturer.h
@@ -66,13 +66,13 @@ class DesktopCapturer {
virtual void SetSharedMemoryFactory(
std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {}
- // Captures next frame. |region| specifies region of the capture target that
- // should be fresh in the resulting frame. The frame may also include fresh
- // data for areas outside |region|. In that case capturer will include these
- // areas in updated_region() of the frame. |region| is specified relative to
- // the top left corner of the capture target. Pending capture operations are
- // canceled when DesktopCapturer is deleted.
- virtual void Capture(const DesktopRegion& region) = 0;
+ // This is a legacy interface, consumers should call Capture2() function.
+ virtual void Capture(const DesktopRegion& region) { Capture2(); }
+
+ // Captures next frame, and involve callback provided by Start() function.
+ // Pending capture requests will be ignored once DesktopCapturer instance has
Sergey Ulanov 2016/10/11 18:42:41 There is no way to issue a capture request after D
Hzj_jie 2016/10/11 19:32:05 Done.
+ // been deleted.
+ virtual void Capture2() { Capture(DesktopRegion()); }
Sergey Ulanov 2016/10/11 18:42:41 Call this Capture(). I don't think there are any i
Hzj_jie 2016/10/11 19:32:05 That won't work, because http://www.stroustrup.com
Sergey Ulanov 2016/10/12 21:22:52 This looks like a different issue. Here both overl
// Sets the window to be excluded from the captured image in the future
// Capture calls. Used to exclude the screenshare notification window for

Powered by Google App Engine
This is Rietveld 408576698