OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Use the <code>chrome.document_scan</code> API to discover and retrieve | 5 // Use the <code>chrome.document_scan</code> API to discover and retrieve |
6 // images from attached paper document scanners. | 6 // images from attached paper document scanners. |
7 namespace documentScan { | 7 namespace documentScan { |
8 dictionary ScanOptions { | 8 dictionary ScanOptions { |
9 // The MIME types that are accepted by the caller. | 9 // The MIME types that are accepted by the caller. |
10 DOMString[]? mimeTypes; | 10 DOMString[]? mimeTypes; |
11 | 11 |
12 // The number of scanned images allowed (defaults to 1). | 12 // The number of scanned images allowed (defaults to 1). |
13 long? maxImages; | 13 long? maxImages; |
14 }; | 14 }; |
15 | 15 |
16 dictionary ScanResults { | 16 dictionary ScanResults { |
17 // The data image URLs in a form that can be passed as the "src" value to | 17 // The data image URLs in a form that can be passed as the "src" value to |
18 // an image tag. | 18 // an image tag. |
19 DOMString[] dataUrls; | 19 DOMString[] dataUrls; |
20 | 20 |
21 // The MIME type of |dataUrls|. | 21 // The MIME type of <code>dataUrls</code>. |
22 DOMString mimeType; | 22 DOMString mimeType; |
23 }; | 23 }; |
24 | 24 |
25 // Callback from the <code>scan</code> method; on success | 25 // Callback from the <code>scan</code> method; on success |
26 // the results from the scan is returned in |results|. | 26 // the results from the scan is returned in |results|. |
not at google - send to devlin
2015/02/03 18:22:17
2 things: "results" was fine, but also, this will
Paul Stewart
2015/02/03 21:43:12
I'm trying to satisfy commentary I'm getting in pa
| |
27 callback ScanCallback = void (ScanResults results); | 27 callback ScanCallback = void (ScanResults result); |
28 | 28 |
29 interface Functions { | 29 interface Functions { |
30 // Performs a document scan. On success, the PNG data will be | 30 // Performs a document scan. On success, the PNG data will be |
31 // sent to the callback. | 31 // sent to the callback. |
32 // |options| : <code>Options</code> object containing scan parameters. | 32 // |options| : Object containing scan parameters. |
33 // |callback| : Called with the result and data from the scan. | 33 // |callback| : Called with the result and data from the scan. |
34 static void scan(ScanOptions options, ScanCallback callback); | 34 static void scan(ScanOptions options, ScanCallback callback); |
35 }; | 35 }; |
36 }; | 36 }; |
OLD | NEW |