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

Unified Diff: content/browser/renderer_host/media/service_video_capture_provider.cc

Issue 2857303002: [Mojo Video Capture] Implement a VideoCaptureProvider using the Mojo service (part 2) (Closed)
Patch Set: Added back update to |state_| which was accidentally dropped in PatchSet 3 Created 3 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/renderer_host/media/service_video_capture_provider.cc
diff --git a/content/browser/renderer_host/media/service_video_capture_provider.cc b/content/browser/renderer_host/media/service_video_capture_provider.cc
index e4a550444ee95d4fdc5552458765068cbf83be87..4d18201e3f24341137f1ae0434a69d6458cb1e29 100644
--- a/content/browser/renderer_host/media/service_video_capture_provider.cc
+++ b/content/browser/renderer_host/media/service_video_capture_provider.cc
@@ -13,18 +13,18 @@
namespace content {
ServiceVideoCaptureProvider::ServiceVideoCaptureProvider() {
- thread_checker_.DetachFromThread();
+ sequence_checker_.DetachFromSequence();
DCHECK(BrowserThread::CurrentlyOn(content::BrowserThread::UI));
connector_ =
ServiceManagerConnection::GetForProcess()->GetConnector()->Clone();
}
ServiceVideoCaptureProvider::~ServiceVideoCaptureProvider() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequence());
}
void ServiceVideoCaptureProvider::Uninitialize() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequence());
device_factory_.reset();
device_factory_provider_.reset();
}
@@ -32,14 +32,14 @@ void ServiceVideoCaptureProvider::Uninitialize() {
void ServiceVideoCaptureProvider::GetDeviceInfosAsync(
const base::Callback<void(
const std::vector<media::VideoCaptureDeviceInfo>&)>& result_callback) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequence());
LazyConnectToService();
device_factory_->GetDeviceInfos(result_callback);
}
std::unique_ptr<VideoCaptureDeviceLauncher>
ServiceVideoCaptureProvider::CreateDeviceLauncher() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequence());
LazyConnectToService();
return base::MakeUnique<ServiceVideoCaptureDeviceLauncher>(&device_factory_);
}
@@ -59,7 +59,7 @@ void ServiceVideoCaptureProvider::LazyConnectToService() {
}
void ServiceVideoCaptureProvider::OnLostConnectionToDeviceFactory() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequence());
// This may indicate that the video capture service has crashed. Uninitialize
// here, so that a new connection will be established when clients try to
// reconnect.
« no previous file with comments | « content/browser/renderer_host/media/service_video_capture_provider.h ('k') | services/video_capture/service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698