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

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

Issue 2557513003: ShapeDetection: Eliminate DetectorType enum in ShapeDetector.cpp (Closed)
Patch Set: Remove state info from parent class, add doDetect() pure virtual method. 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
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..2860fd736370280b5b8667b7f0ea9d9767e0340f 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,
+ int);
Reilly Grant (use Gerrit) 2016/12/06 20:40:12 Blink style allows unnamed parameters when the typ
xianglu 2016/12/06 22:31:56 Done.
+ void onDetectBarcodes(ScriptPromiseResolver*,
+ Vector<mojom::blink::BarcodeDetectionResultPtr>);
+ void onBarcodeServiceConnectionError();
+
+ mojom::blink::BarcodeDetectionPtr m_barcodeService;
+
+ HeapHashSet<Member<ScriptPromiseResolver>> m_barcodeServiceRequests;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698