Index: media/capture/video/video_capture_device.h |
diff --git a/media/capture/video/video_capture_device.h b/media/capture/video/video_capture_device.h |
index 24dec1d185780911d032f77b4f48eedcd34dfd02..fa02cb857162b68308a5f5020590992d1653a562 100644 |
--- a/media/capture/video/video_capture_device.h |
+++ b/media/capture/video/video_capture_device.h |
@@ -28,6 +28,8 @@ |
#include "media/base/media_export.h" |
#include "media/base/video_capture_types.h" |
#include "media/base/video_frame.h" |
+#include "media/capture/video/scoped_callback.h" |
+#include "third_party/WebKit/public/platform/modules/imagecapture/image_capture.mojom.h" |
#include "ui/gfx/gpu_memory_buffer.h" |
namespace tracked_objects { |
@@ -300,14 +302,10 @@ class MEDIA_EXPORT VideoCaptureDevice { |
virtual void StopAndDeAllocate() = 0; |
// Asynchronously takes a photo, possibly reconfiguring the capture objects |
- // and/or interrupting the capture flow. Returns false if taking the picture |
- // could not be scheduled at all, or else runs |photo_callback| (on the thread |
- // where TakePhoto() is run). |
- using TakePhotoCallback = |
- base::Callback<void(const std::string&, |
- std::unique_ptr<std::vector<uint8_t>>)>; |
- virtual bool TakePhoto(const TakePhotoCallback& photo_callback) |
- WARN_UNUSED_RESULT; |
+ // and/or interrupting the capture flow. Runs |callback| on the thread |
+ // where TakePhoto() is called, if the photo was successfully taken. |
+ using TakePhotoCallback = blink::mojom::ImageCapture::TakePhotoCallback; |
+ virtual void TakePhoto(ScopedCallback<TakePhotoCallback> callback); |
// Gets the power line frequency, either from the params if specified by the |
// user or from the current system time zone. |