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

Side by Side Diff: third_party/WebKit/Source/modules/shapedetection/ShapeDetector.h

Issue 2538053002: Barcode/Face detection: reject requests in platforms where not implemented (Closed)
Patch Set: moar comments 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ShapeDetector_h 5 #ifndef ShapeDetector_h
6 #define ShapeDetector_h 6 #define ShapeDetector_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ScriptPromiseResolver*, 50 ScriptPromiseResolver*,
51 uint8_t* data, 51 uint8_t* data,
52 int size, 52 int size,
53 int width, 53 int width,
54 int height); 54 int height);
55 void onDetectFaces(ScriptPromiseResolver*, 55 void onDetectFaces(ScriptPromiseResolver*,
56 mojom::blink::FaceDetectionResultPtr); 56 mojom::blink::FaceDetectionResultPtr);
57 void onDetectBarcodes(ScriptPromiseResolver*, 57 void onDetectBarcodes(ScriptPromiseResolver*,
58 Vector<mojom::blink::BarcodeDetectionResultPtr>); 58 Vector<mojom::blink::BarcodeDetectionResultPtr>);
59 59
60 // Error handlers for use if mojo service doesn't connect.
61 void onFaceServiceConnectionError();
62 void onBarcodeServiceConnectionError();
63
60 mojom::blink::FaceDetectionPtr m_faceService; 64 mojom::blink::FaceDetectionPtr m_faceService;
61 mojom::blink::BarcodeDetectionPtr m_barcodeService; 65 mojom::blink::BarcodeDetectionPtr m_barcodeService;
62 66
63 HeapHashSet<Member<ScriptPromiseResolver>> m_serviceRequests; 67 HeapHashSet<Member<ScriptPromiseResolver>> m_faceServiceRequests;
68 HeapHashSet<Member<ScriptPromiseResolver>> m_barcodeServiceRequests;
64 69
65 protected: 70 protected:
66 mojom::blink::FaceDetectorOptionsPtr m_faceDetectorOptions; 71 mojom::blink::FaceDetectorOptionsPtr m_faceDetectorOptions;
67 }; 72 };
68 73
69 } // namespace blink 74 } // namespace blink
70 75
71 #endif // ShapeDetector_h 76 #endif // ShapeDetector_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698