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

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

Issue 2859413002: Shape Detection: add idl and mojom for face landmarks and wire for Mac (Closed)
Patch Set: service-worker's global-interface-listing-expected.txt updated Created 3 years, 7 months 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/DetectedFace.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedFace.cpp b/third_party/WebKit/Source/modules/shapedetection/DetectedFace.cpp
index a90860c0bb928ecaa1007ab1b95535c93d05e649..d8079fa54f7912b104d4c7491bdb6a696963a2fa 100644
--- a/third_party/WebKit/Source/modules/shapedetection/DetectedFace.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/DetectedFace.cpp
@@ -5,6 +5,7 @@
#include "modules/shapedetection/DetectedFace.h"
#include "core/geometry/DOMRect.h"
+#include "modules/shapedetection/Landmark.h"
namespace blink {
@@ -16,15 +17,29 @@ DetectedFace* DetectedFace::Create(DOMRect* bounding_box) {
return new DetectedFace(bounding_box);
}
+DetectedFace* DetectedFace::Create(DOMRect* bounding_box,
+ const HeapVector<Landmark>& landmarks) {
+ return new DetectedFace(bounding_box, landmarks);
+}
+
DOMRect* DetectedFace::boundingBox() const {
return bounding_box_.Get();
}
+const HeapVector<Landmark>& DetectedFace::landmarks() const {
+ return landmarks_;
+}
+
DetectedFace::DetectedFace(DOMRect* bounding_box)
: bounding_box_(bounding_box) {}
+DetectedFace::DetectedFace(DOMRect* bounding_box,
+ const HeapVector<Landmark>& landmarks)
+ : bounding_box_(bounding_box), landmarks_(landmarks) {}
+
DEFINE_TRACE(DetectedFace) {
visitor->Trace(bounding_box_);
+ visitor->Trace(landmarks_);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698