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

Unified Diff: media/capture/video/mac/video_capture_device_mac.mm

Issue 2167313002: ImageCapture: introduce image_capture Blob to allow move-only semantics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: foolip comments and rebase Created 4 years, 5 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: media/capture/video/mac/video_capture_device_mac.mm
diff --git a/media/capture/video/mac/video_capture_device_mac.mm b/media/capture/video/mac/video_capture_device_mac.mm
index 67128563d76b40cf578e41539705a537b14b82b6..e11e646de7f847979beb018dbe337ca03937dfbd 100644
--- a/media/capture/video/mac/video_capture_device_mac.mm
+++ b/media/capture/video/mac/video_capture_device_mac.mm
@@ -444,8 +444,10 @@ void VideoCaptureDeviceMac::OnPhotoTaken(const uint8_t* image_data,
return;
}
- photo_callback_->Run(
- mime_type, std::vector<uint8_t>(image_data, image_data + image_length));
+ mojom::BlobPtr blob = mojom::Blob::New();
+ blob->data.assign(image_data, image_data + image_length);
+ blob->mime_type = mime_type;
+ photo_callback_->Run(std::move(blob));
photo_callback_.reset();
}
« no previous file with comments | « media/capture/video/fake_video_capture_device_unittest.cc ('k') | media/capture/video/video_capture_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698