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

Unified Diff: content/browser/media/capture/content_video_capture_device_core.h

Issue 1140113002: Implement screen capture for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ScreenCaptureMachineAndroid which inherited from content::VideoCaptureMachine Created 5 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
Index: content/browser/media/capture/content_video_capture_device_core.h
diff --git a/content/browser/media/capture/content_video_capture_device_core.h b/content/browser/media/capture/content_video_capture_device_core.h
index f477a157439a33aa845cc0758008cc099a49163b..723a7aef87a9d74d2ca6699e85adbe62e0e36b3c 100644
--- a/content/browser/media/capture/content_video_capture_device_core.h
+++ b/content/browser/media/capture/content_video_capture_device_core.h
@@ -108,19 +108,19 @@ class ThreadSafeCaptureOracle
gfx::Size capture_size_;
};
-// Keeps track of the video capture source frames and executes copying on the
-// UI BrowserThread.
+// Keeps track of the video capture source frames and executes copying.
class VideoCaptureMachine {
public:
VideoCaptureMachine() {}
virtual ~VideoCaptureMachine() {}
- // Starts capturing. Returns true if succeeded.
- // Must be run on the UI BrowserThread.
- virtual bool Start(const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy,
- const media::VideoCaptureParams& params) = 0;
+ // Starts capturing.
+ // |callback| is invoked with true if succeeded. Otherwise, with false.
+ virtual void Start(const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy,
+ const media::VideoCaptureParams& params,
+ const base::Callback<void(bool)> callback) = 0;
- // Stops capturing. Must be run on the UI BrowserThread.
+ // Stops capturing.
// |callback| is invoked after the capturing has stopped.
virtual void Stop(const base::Closure& callback) = 0;
@@ -173,9 +173,9 @@ class CONTENT_EXPORT ContentVideoCaptureDeviceCore
// Current lifecycle state.
State state_;
- // Tracks the CaptureMachine that's doing work on our behalf on the UI thread.
- // This value should never be dereferenced by this class, other than to
- // create and destroy it on the UI thread.
+ // Tracks the CaptureMachine that's doing work on our behalf
+ // on the device thread or UI thread.
+ // This value should never be dereferenced by this class.
scoped_ptr<VideoCaptureMachine> capture_machine_;
// Our thread-safe capture oracle which serves as the gateway to the video

Powered by Google App Engine
This is Rietveld 408576698