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

Unified Diff: third_party/WebKit/Source/modules/shapedetection/TextDetector.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/TextDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
index d887f9db3d5f8ef36cc7590c86847e4dc04d6fbb..e53f3c53c994e0bb06bfee27ff4f7e0a822ccfa4 100644
--- a/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/TextDetector.cpp
@@ -24,11 +24,8 @@ TextDetector::TextDetector() : ShapeDetector() {
&TextDetector::onTextServiceConnectionError, wrapWeakPersistent(this))));
}
-ScriptPromise TextDetector::doDetect(
- ScriptPromiseResolver* resolver,
- mojo::ScopedSharedBufferHandle sharedBufferHandle,
- int imageWidth,
- int imageHeight) {
+ScriptPromise TextDetector::doDetect(ScriptPromiseResolver* resolver,
+ skia::mojom::blink::BitmapPtr bitmap) {
ScriptPromise promise = resolver->promise();
if (!m_textService) {
resolver->reject(DOMException::create(
@@ -36,7 +33,7 @@ ScriptPromise TextDetector::doDetect(
return promise;
}
m_textServiceRequests.insert(resolver);
- m_textService->Detect(std::move(sharedBufferHandle), imageWidth, imageHeight,
+ m_textService->Detect(std::move(bitmap),
convertToBaseCallback(WTF::bind(
&TextDetector::onDetectText, wrapPersistent(this),
wrapPersistent(resolver))));

Powered by Google App Engine
This is Rietveld 408576698