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

Unified Diff: media/capture/video/video_capture_device.h

Issue 2005753006: ImageCapture: ScopedResultCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rockot@s nit Created 4 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
« no previous file with comments | « media/capture/video/scoped_result_callback.h ('k') | media/capture/video/video_capture_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 56a00772bf28064d3e171f24ab26a1bfd9ab455f..fc4242588540ddc3e09067744c32c84a9ebe7fb1 100644
--- a/media/capture/video/video_capture_device.h
+++ b/media/capture/video/video_capture_device.h
@@ -28,6 +28,9 @@
#include "media/base/media_export.h"
#include "media/base/video_capture_types.h"
#include "media/base/video_frame.h"
+#include "media/capture/video/scoped_result_callback.h"
+#include "mojo/public/cpp/bindings/array.h"
+#include "mojo/public/cpp/bindings/callback.h"
#include "ui/gfx/gpu_memory_buffer.h"
namespace tracked_objects {
@@ -310,14 +313,11 @@ 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).
+ // and/or interrupting the capture flow. Runs |callback| on the thread
+ // where TakePhoto() is called, if the photo was successfully taken.
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;
+ mojo::Callback<void(mojo::String, mojo::Array<uint8_t>)>;
+ virtual void TakePhoto(ScopedResultCallback<TakePhotoCallback> callback);
// Gets the power line frequency, either from the params if specified by the
// user or from the current system time zone.
« no previous file with comments | « media/capture/video/scoped_result_callback.h ('k') | media/capture/video/video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698