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

Unified Diff: third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h

Issue 1899403002: MediaStream Image Capture (2): Platform::ImageCaptureFrameGrabber and grabFrame() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reillyg@ comments and made SkBitmap immutable Created 4 years, 8 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: third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h
diff --git a/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h b/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h
new file mode 100644
index 0000000000000000000000000000000000000000..b54b1ea4c3191e54808872b03d70cbf30f7fe6f8
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebImageCaptureFrameGrabber.h
@@ -0,0 +1,31 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WebImageCaptureFrameGrabber_h
+#define WebImageCaptureFrameGrabber_h
+
+#include "public/platform/WebCallbacks.h"
+#include "public/platform/WebCommon.h"
+
+// Can't use SkImage because that has shared ownership semantics whereas
+// WebCallbacks like moveable-non-copyable types.
+class SkBitmap;
+
+namespace blink {
+
+class WebMediaStreamTrack;
+
+using WebImageCaptureGrabFrameCallbacks = WebCallbacks<std::unique_ptr<SkBitmap>, void>;
+
+// Platform interface of an ImageCapture class for grabFrame() calls.
+class WebImageCaptureFrameGrabber {
+public:
+ virtual ~WebImageCaptureFrameGrabber() { }
+
+ virtual void grabFrame(WebMediaStreamTrack*, WebImageCaptureGrabFrameCallbacks*) = 0;
+};
+
+} // namespace blink
+
+#endif // WebImageCaptureFrameGrabber_h

Powered by Google App Engine
This is Rietveld 408576698