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

Unified Diff: third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp

Issue 2755393002: Revert of RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: Created 3 years, 9 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/Source/modules/shapedetection/BarcodeDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
index 6e9abeb5811c4dac9efb8eb1650458c2588ff571..a78d39b6a019b5361e625f7d25576a391ae07491 100644
--- a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp
@@ -26,8 +26,11 @@
wrapWeakPersistent(this))));
}
-ScriptPromise BarcodeDetector::doDetect(ScriptPromiseResolver* resolver,
- skia::mojom::blink::BitmapPtr bitmap) {
+ScriptPromise BarcodeDetector::doDetect(
+ ScriptPromiseResolver* resolver,
+ mojo::ScopedSharedBufferHandle sharedBufferHandle,
+ int imageWidth,
+ int imageHeight) {
ScriptPromise promise = resolver->promise();
if (!m_barcodeService) {
resolver->reject(DOMException::create(
@@ -36,9 +39,10 @@
}
m_barcodeServiceRequests.insert(resolver);
m_barcodeService->Detect(
- std::move(bitmap), convertToBaseCallback(WTF::bind(
- &BarcodeDetector::onDetectBarcodes,
- wrapPersistent(this), wrapPersistent(resolver))));
+ std::move(sharedBufferHandle), imageWidth, imageHeight,
+ convertToBaseCallback(WTF::bind(&BarcodeDetector::onDetectBarcodes,
+ wrapPersistent(this),
+ wrapPersistent(resolver))));
return promise;
}

Powered by Google App Engine
This is Rietveld 408576698