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

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

Issue 2528743002: Shape Detection: Implement FaceDetection on Mac as out-of-process service (Closed)
Patch Set: avi@ comments, rebase 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/ShapeDetector.cpp
diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
index 241ac7cd5075f7965115e0e04510165fc75d4512..8e7c4be1724b44e03374b0074f8d7b0204eec52b 100644
--- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
@@ -11,8 +11,7 @@
#include "core/frame/LocalFrame.h"
#include "core/html/HTMLImageElement.h"
#include "core/html/HTMLVideoElement.h"
-#include "core/html/ImageData.h"
-#include "core/loader/resource/ImageResourceContent.h"
+#include "core/html/canvas/CanvasImageSource.h"
#include "platform/graphics/Image.h"
#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkImageInfo.h"
@@ -48,6 +47,7 @@ mojo::ScopedSharedBufferHandle getSharedBufferOnData(
} // anonymous namespace
+// TODO(xianglu): We don't need a service per frame. Remove this argument.
ShapeDetector::ShapeDetector(LocalFrame& frame) {
DCHECK(frame.interfaceProvider());
}
@@ -79,12 +79,12 @@ ScriptPromise ShapeDetector::detect(ScriptState* scriptState,
return promise;
}
- if (canvasImageSource->wouldTaintOrigin(
- scriptState->getExecutionContext()->getSecurityOrigin())) {
- resolver->reject(
- DOMException::create(SecurityError, "Source would taint origin."));
- return promise;
- }
+ // if (canvasImageSource->wouldTaintOrigin(
+ // scriptState->getExecutionContext()->getSecurityOrigin())) {
+ // resolver->reject(
+ // DOMException::create(SecurityError, "Source would taint origin."));
+ // return promise;
+ // }
if (imageSource.isHTMLImageElement()) {
return detectShapesOnImageElement(resolver,

Powered by Google App Engine
This is Rietveld 408576698