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

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

Issue 514073002: Fix for ~ContentCaptureSubscription() after BrowserThreads are torn down. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 60d8b7be04f59301faf56f910059d728889c7ce2..c86bb6c883aaea3a1e7eb7a9943366b2fb89a056 100644
--- a/content/browser/media/capture/content_video_capture_device_core.h
+++ b/content/browser/media/capture/content_video_capture_device_core.h
@@ -119,12 +119,9 @@ class ThreadSafeCaptureOracle
// 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,
@@ -134,9 +131,6 @@ class VideoCaptureMachine {
// |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);
};
@@ -145,7 +139,7 @@ class 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.
miu 2014/08/28 01:59:56 Note: I removed references to the IO thread becaus
+// 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
@@ -173,8 +167,8 @@ class CONTENT_EXPORT ContentVideoCaptureDeviceCore
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.
@@ -193,7 +187,7 @@ class CONTENT_EXPORT ContentVideoCaptureDeviceCore
// 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);

Powered by Google App Engine
This is Rietveld 408576698