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

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

Issue 2575943002: Barcode Detection: Add |cornerPoints| to DetectedBarcode.idl (Closed)
Patch Set: Correct coordinates (in clockwise direction starting with top-left) 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/DetectedBarcode.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.cpp b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.cpp
index d0e150045e60acd6322ef9f9c54d3ffb3bd43d70..622dcce82362e07453da1aa37560b6120584eed3 100644
--- a/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.cpp
@@ -9,12 +9,15 @@
namespace blink {
DetectedBarcode* DetectedBarcode::create() {
- return new DetectedBarcode(emptyString(), DOMRect::create(0, 0, 0, 0));
+ HeapVector<Point2D> emptyList;
+ return new DetectedBarcode(emptyString(), DOMRect::create(0, 0, 0, 0),
+ emptyList);
}
DetectedBarcode* DetectedBarcode::create(String rawValue,
- DOMRect* boundingBox) {
- return new DetectedBarcode(rawValue, boundingBox);
+ DOMRect* boundingBox,
+ HeapVector<Point2D> cornerPoints) {
+ return new DetectedBarcode(rawValue, boundingBox, cornerPoints);
}
const String& DetectedBarcode::rawValue() const {
@@ -25,11 +28,20 @@ DOMRect* DetectedBarcode::boundingBox() const {
return m_boundingBox.get();
}
-DetectedBarcode::DetectedBarcode(String rawValue, DOMRect* boundingBox)
- : m_rawValue(rawValue), m_boundingBox(boundingBox) {}
+const HeapVector<Point2D>& DetectedBarcode::cornerPoints() const {
+ return m_cornerPoints;
+}
+
+DetectedBarcode::DetectedBarcode(String rawValue,
+ DOMRect* boundingBox,
+ HeapVector<Point2D> cornerPoints)
+ : m_rawValue(rawValue),
+ m_boundingBox(boundingBox),
+ m_cornerPoints(cornerPoints) {}
DEFINE_TRACE(DetectedBarcode) {
visitor->trace(m_boundingBox);
+ visitor->trace(m_cornerPoints);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698