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

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

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

Powered by Google App Engine
This is Rietveld 408576698