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

Side by Side Diff: chrome/common/extensions/api/document_scan.idl

Issue 286933006: Implement a JavaScript API for document scanning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address kalman@'s comments. Still need tests. Created 6 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Use the <code>chrome.document_scan</code> API to discover and retrieve
6 // images from attached paper document scanners.
7 namespace documentScan {
8 dictionary ScanOptions {
9 // The MIME types that are accepted by the caller.
10 DOMString[]? mimeTypes;
11
12 // The number of scanned images allowed (defaults to 1).
13 long? maxImages;
asargent_no_longer_on_chrome 2014/10/23 22:15:57 How are we expecting developers to handle multi-pa
Paul Stewart 2014/10/23 23:06:58 This is simply a hint to the UI handling the image
14 };
15
16 dictionary ScanResults {
17 // The data image URLs in a form that can be passed as the "src" value to
18 // an image tag.
19 DOMString[] dataUrls;
asargent_no_longer_on_chrome 2014/10/23 22:15:57 I wonder if it would be better to cache the image
Paul Stewart 2014/10/23 23:06:58 I'd prefer to move forward as-is. This does work
20
21 // The MIME type of |dataUrls|.
22 DOMString mimeType;
23 };
24
25 // Callback from the <code>scan</code> method; on success (result == true)
asargent_no_longer_on_chrome 2014/10/23 22:15:57 nit: looks like you removed |result| in favor of j
Paul Stewart 2014/10/23 23:06:58 Done.
26 // the results from the scan is returned in |results|.
27 callback ScanCallback = void (ScanResults results);
28
29 interface Functions {
30 // Performs a document scan. On success, the PNG data will be
31 // sent to the callback.
32 // |options| : <code>Options</code> object containing scan parameters.
33 // |callback| : Called with the result and data from the scan.
34 static void scan(ScanOptions options, ScanCallback callback);
35 };
36 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698