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

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

Issue 2557513003: ShapeDetection: Eliminate DetectorType enum in ShapeDetector.cpp (Closed)
Patch Set: Move tainting logic into detect() Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
diff --git a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
index e8767457c207f7d15dcb49b4d5ad79c182a84bd5..126559c269b3a55915dcc100ec2cf138dc977506 100644
--- a/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
+++ b/third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.h
@@ -11,6 +11,7 @@
#include "modules/ModulesExport.h"
#include "modules/canvas2d/CanvasRenderingContext2D.h"
#include "modules/shapedetection/ShapeDetector.h"
+#include "public/platform/modules/shapedetection/barcodedetection.mojom-blink.h"
namespace blink {
@@ -23,12 +24,23 @@ class MODULES_EXPORT BarcodeDetector final : public ShapeDetector,
public:
static BarcodeDetector* create(Document&);
- ScriptPromise detect(ScriptState*, const CanvasImageSourceUnion&);
DECLARE_VIRTUAL_TRACE();
private:
explicit BarcodeDetector(LocalFrame&);
~BarcodeDetector() override = default;
+
+ ScriptPromise doDetect(ScriptPromiseResolver*,
+ mojo::ScopedSharedBufferHandle,
+ int imageWidth,
+ int imageHeight) override;
+ void onDetectBarcodes(ScriptPromiseResolver*,
+ Vector<mojom::blink::BarcodeDetectionResultPtr>);
+ void onBarcodeServiceConnectionError();
+
+ mojom::blink::BarcodeDetectionPtr m_barcodeService;
+
+ HeapHashSet<Member<ScriptPromiseResolver>> m_barcodeServiceRequests;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698