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

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

Issue 2696143002: Revert of RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: Created 3 years, 10 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 7dce489c7fc9aef5ecbaa7cd98ae2de7901a872e..9f8beca22fe138b0f4f43d382b99b92d98f5083a 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