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

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: IDL indicates multiple images can be returned 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[]? accepted_mime_types;
not at google - send to devlin 2014/10/20 22:36:13 "accepted" is probably unnecessary in this context
Paul Stewart 2014/10/21 02:42:16 Done.
11
12 // The number of scanned images allowed (defaults to 1).
13 long? scannedImageCount;
not at google - send to devlin 2014/10/20 22:36:13 Be consistent with underscores vs camel case. We u
Paul Stewart 2014/10/21 02:42:16 Done.
14 };
15
16 // Callback from the <code>scan</code> method; on success (result == true)
17 // images from the scan is returned in the |data_urls| strings which can be
18 // passed as the "src" value to an image tag. The image data is of the
19 // type |mime_type|.
20 callback ScanCallback = void (DOMString[] data_urls, DOMString mime_type);
not at google - send to devlin 2014/10/20 22:36:13 It's better for backwards compatibility to use a p
Paul Stewart 2014/10/21 02:42:16 Using "dataUrls" instead of "dataURLs" since the I
not at google - send to devlin 2014/10/21 17:30:01 Ah bummer. We should fix the schema compiler (thou
21
22 interface Functions {
23 // Performs a document scan. On success, the PNG data will be
24 // sent to the callback.
25 // |options| : <code>ScanOptions</code> object containing scan parameters.
26 // |callback| : Called with the result and data from the scan.
27 static void scan(ScanOptions options, ScanCallback callback);
28 };
29 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/api.gyp ('k') | chrome/common/extensions/docs/examples/api/document_scan/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698