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

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

Issue 2875243002: RELAND: ShapeDetection: use mojom::Bitmap for mojo interface. (Closed)
Patch Set: RELAND2: ShapeDetection: use mojom::Bitmap for mojo interface. Created 3 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
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 f657b7f5fd3c5326c8331e921cebc276d35435bc..7f5f3a37049edd5f0ff564ebc2d57930ad1ee9b7 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 shared_buffer_handle,
- int image_width,
- int image_height) {
+ScriptPromise BarcodeDetector::DoDetect(ScriptPromiseResolver* resolver,
+ skia::mojom::blink::BitmapPtr bitmap) {
ScriptPromise promise = resolver->Promise();
if (!barcode_service_) {
resolver->Reject(DOMException::Create(
@@ -39,10 +36,9 @@ ScriptPromise BarcodeDetector::DoDetect(
}
barcode_service_requests_.insert(resolver);
barcode_service_->Detect(
- std::move(shared_buffer_handle), image_width, image_height,
- 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