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

Side by Side Diff: third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "modules/shapedetection/BarcodeDetector.h"
6
7 #include "core/dom/DOMException.h"
8 #include "core/frame/LocalDOMWindow.h"
9 #include "core/frame/LocalFrame.h"
10 #include "core/html/canvas/CanvasImageSource.h"
11
12 namespace blink {
13
14 BarcodeDetector* BarcodeDetector::create(ScriptState* scriptState) {
15 return new BarcodeDetector(*scriptState->domWindow()->frame());
16 }
17
18 BarcodeDetector::BarcodeDetector(LocalFrame& frame) : ShapeDetector(frame) {}
19
20 ScriptPromise BarcodeDetector::detect(
21 ScriptState* scriptState,
22 const CanvasImageSourceUnion& imageSource) {
23 return detectShapes(scriptState, ShapeDetector::DetectorType::Barcode,
24 imageSource);
25 }
26
27 DEFINE_TRACE(BarcodeDetector) {
28 ShapeDetector::trace(visitor);
29 }
30
31 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698