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

Side by Side Diff: chrome/browser/extensions/api/document_scan/document_scan_interface_nonchromeos.cc

Issue 286933006: Implement a JavaScript API for document scanning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT complete 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 #include "chrome/browser/extensions/api/document_scan/document_scan_interface.h"
6
7 using std::string;
8 using std::vector;
9
10 namespace {
11
12 const char kScanFunctionNotImplementedError[] = "Scan function not implemented";
13
14 } // namespace
15
16 namespace extensions {
17
18 namespace api {
19
20 class DocumentScanInterfaceImpl : public DocumentScanInterface {
21 public:
22 DocumentScanInterfaceImpl() {}
23 virtual ~DocumentScanInterfaceImpl() {}
24
25 virtual void ListScanners(
26 const ListScannersResultsCallback& callback) override {
27 callback.Run(vector<ScannerDescription> (), "");
28 }
29 virtual void Scan(const string& scanner_name,
30 ScanMode mode,
31 int resolution_dpi,
32 const ScanResultsCallback& callback) override {
33 callback.Run("", "", kScanFunctionNotImplementedError);
34 }
35
36 private:
37 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceImpl);
38 };
39
40 // static
41 DocumentScanInterface *DocumentScanInterface::CreateInstance() {
42 return new DocumentScanInterfaceImpl();
43 }
44
45 } // namespace api
46
47 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698