// UI BrowserThread.
class VideoCaptureMachine {
public:
- VideoCaptureMachine() : started_(false) {}
+ VideoCaptureMachine() {}
virtual ~VideoCaptureMachine() {}
- // This should only be checked on the UI thread.
- bool started() const { return started_; }
-
// Starts capturing. Returns true if succeeded.
// Must be run on the UI BrowserThread.
virtual bool Start(const scoped_refptr<ThreadSafeCaptureOracle>& oracle_proxy,
// |callback| is invoked after the capturing has stopped.
virtual void Stop(const base::Closure& callback) = 0;
- protected:
- bool started_;
-
private:
DISALLOW_COPY_AND_ASSIGN(VideoCaptureMachine);
};
//
// Separating this from the "shell classes" WebContentsVideoCaptureDevice and
// DesktopCaptureDeviceAura allows safe destruction without needing to block any
-// threads (e.g., the IO BrowserThread), as well as code sharing.
+// threads, as well as code sharing.
//
// ContentVideoCaptureDeviceCore manages a simple state machine and the pipeline
// (see notes at top of this file). It times the start of successive captures
void TransitionStateTo(State next_state);
- // Called on the IO thread in response to StartCaptureMachine().
- // |success| is true if capture machine succeeded to start.
+ // Called back in response to StartCaptureMachine(). |success| is true if
+ // capture machine succeeded to start.
void CaptureStarted(bool success);
// Stops capturing and notifies client_ of an error state.
// Our thread-safe capture oracle which serves as the gateway to the video
// capture pipeline. Besides the VideoCaptureDevice itself, it is the only
- // component of the/ system with direct access to |client_|.
+ // component of the system with direct access to |client_|.
scoped_refptr<ThreadSafeCaptureOracle> oracle_proxy_;
DISALLOW_COPY_AND_ASSIGN(ContentVideoCaptureDeviceCore);