Chromium Code Reviews| 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..8b9e8471a807ccd04396cdc8c606071f462e16a0 |
| --- /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("", DOMRect::create(0, 0, 0, 0)); |
|
haraken
2016/11/16 04:15:10
Use String::empty().
mcasas
2016/11/16 05:23:10
Done.
|
| +} |
| + |
| +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 |