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

Side by Side Diff: chrome/browser/extensions/api/document_scan/document_scan_api.h

Issue 286933006: Implement a JavaScript API for document scanning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Starting over. This used to be 286933006 Created 6 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/document_scan/document_scan_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <string>
6 #include <vector>
7
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/extensions/api/document_scan/document_scan_interface.h"
10 #include "chrome/common/extensions/api/document_scan.h"
11 #include "extensions/browser/api/async_api_function.h"
12
13 #ifndef CHROME_BROWSER_EXTENSIONS_API_DOCUMENT_SCAN_DOCUMENT_SCAN_FUNCTION_H_
14 #define CHROME_BROWSER_EXTENSIONS_API_DOCUMENT_SCAN_DOCUMENT_SCAN_FUNCTION_H_
15
16 namespace extensions {
17
18 namespace api {
19
20 class DocumentScanScanFunction : public AsyncApiFunction {
21 public:
22 DECLARE_EXTENSION_FUNCTION("documentScan.scan",
23 DOCUMENT_SCAN_SCAN)
24 DocumentScanScanFunction();
25
26 protected:
27 ~DocumentScanScanFunction();
28
29 // AsyncApiFunction:
30 virtual bool Prepare() override;
31 virtual void AsyncWorkStart() override;
32 virtual bool Respond() override;
33
34 private:
35 friend class DocumentScanScanFunctionTest;
36
37 void OnScannerListReceived(
38 const std::vector<DocumentScanInterface::ScannerDescription>&
39 scanner_descriptions,
40 const std::string& error);
41 void OnResultsReceived(const std::string& scanned_image,
42 const std::string& mime_type,
43 const std::string& error);
44
45 scoped_ptr<document_scan::Scan::Params> params_;
46 scoped_ptr<DocumentScanInterface> document_scan_interface_;
47
48 DISALLOW_COPY_AND_ASSIGN(DocumentScanScanFunction);
49 };
50
51 } // namespace api
52
53 } // namespace extensions
54
55 #endif // CHROME_BROWSER_EXTENSIONS_API_DOCUMENT_SCAN_DOCUMENT_SCAN_FUNCTION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/document_scan/document_scan_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698