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

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

Issue 2502723002: ShapeDetection: implement barcode detection, blink part (Closed)
Patch Set: haraken@ comments Created 4 years, 1 month 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
new file mode 100644
index 0000000000000000000000000000000000000000..d0e150045e60acd6322ef9f9c54d3ffb3bd43d70
--- /dev/null
+++ b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.cpp
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "modules/shapedetection/DetectedBarcode.h"
+
+#include "core/dom/DOMRect.h"
+
+namespace blink {
+
+DetectedBarcode* DetectedBarcode::create() {
+ return new DetectedBarcode(emptyString(), DOMRect::create(0, 0, 0, 0));
+}
+
+DetectedBarcode* DetectedBarcode::create(String rawValue,
+ DOMRect* boundingBox) {
+ return new DetectedBarcode(rawValue, boundingBox);
+}
+
+const String& DetectedBarcode::rawValue() const {
+ return m_rawValue;
+}
+
+DOMRect* DetectedBarcode::boundingBox() const {
+ return m_boundingBox.get();
+}
+
+DetectedBarcode::DetectedBarcode(String rawValue, DOMRect* boundingBox)
+ : m_rawValue(rawValue), m_boundingBox(boundingBox) {}
+
+DEFINE_TRACE(DetectedBarcode) {
+ visitor->trace(m_boundingBox);
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698