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

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

Issue 2902203002: [Mojo Video Capture] Hook up connection lost events (Closed)
Patch Set: Fix duplicate member introduced during merging 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_launched_video_capture_device.cc
diff --git a/content/browser/renderer_host/media/service_launched_video_capture_device.cc b/content/browser/renderer_host/media/service_launched_video_capture_device.cc
index af54de397dccd1866808356211a4126d35b2ef05..71b8d14e6cf2da78ae91be4cf384e6d65dd291f0 100644
--- a/content/browser/renderer_host/media/service_launched_video_capture_device.cc
+++ b/content/browser/renderer_host/media/service_launched_video_capture_device.cc
@@ -7,8 +7,10 @@
namespace content {
ServiceLaunchedVideoCaptureDevice::ServiceLaunchedVideoCaptureDevice(
- video_capture::mojom::DevicePtr device)
- : device_(std::move(device)) {
+ video_capture::mojom::DevicePtr device,
+ base::OnceClosure connection_lost_cb)
+ : device_(std::move(device)),
+ connection_lost_cb_(std::move(connection_lost_cb)) {
// Unretained |this| is safe, because |this| owns |device_|.
device_.set_connection_error_handler(
base::Bind(&ServiceLaunchedVideoCaptureDevice::OnLostConnectionToDevice,
@@ -71,7 +73,7 @@ void ServiceLaunchedVideoCaptureDevice::OnUtilizationReport(
void ServiceLaunchedVideoCaptureDevice::OnLostConnectionToDevice() {
DCHECK(sequence_checker_.CalledOnValidSequence());
- NOTIMPLEMENTED();
+ base::ResetAndReturn(&connection_lost_cb_).Run();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698