Chromium Code Reviews| Index: third_party/WebKit/Source/modules/shapedetection/DetectedText.cpp |
| diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedText.cpp b/third_party/WebKit/Source/modules/shapedetection/DetectedText.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..988f17f421cf7bb2c4173ccf3804f4df6398a5ba |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/shapedetection/DetectedText.cpp |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
|
haraken
2017/01/04 12:10:31
Nit: 2016 => 2017
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "modules/shapedetection/DetectedText.h" |
| + |
| +#include "core/dom/DOMRect.h" |
| + |
| +namespace blink { |
| + |
| +DetectedText* DetectedText::create() { |
| + return new DetectedText(emptyString(), DOMRect::create()); |
| +} |
| + |
| +DetectedText* DetectedText::create(String rawValue, DOMRect* boundingBox) { |
| + return new DetectedText(rawValue, boundingBox); |
| +} |
| + |
| +const String& DetectedText::rawValue() const { |
| + return m_rawValue; |
| +} |
| + |
| +DOMRect* DetectedText::boundingBox() const { |
| + return m_boundingBox.get(); |
| +} |
| + |
| +DetectedText::DetectedText(String rawValue, DOMRect* boundingBox) |
| + : m_rawValue(rawValue), m_boundingBox(boundingBox) {} |
| + |
| +DEFINE_TRACE(DetectedText) { |
| + visitor->trace(m_boundingBox); |
| +} |
| + |
| +} // namespace blink |