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

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: 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
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 namespace {
8
9 const char kScanFunctionNotImplementedError[] = "Scan function not implemented";
10
11 } // namespace
12
13 namespace extensions {
14
15 namespace api {
16
17 class DocumentScanInterfaceImpl : public DocumentScanInterface {
18 public:
19 DocumentScanInterfaceImpl() {}
20 virtual ~DocumentScanInterfaceImpl() {}
21
22 virtual void ListScanners(
23 const ListScannersResultsCallback& callback) override {
24 callback.Run(std::vector<ScannerDescription> (), "");
25 }
26 virtual void Scan(const std::string& scanner_name,
27 ScanMode mode,
28 int resolution_dpi,
29 const ScanResultsCallback& callback) override {
30 callback.Run("", "", kScanFunctionNotImplementedError);
31 }
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceImpl);
35 };
36
37 // static
38 DocumentScanInterface *DocumentScanInterface::CreateInstance() {
39 return new DocumentScanInterfaceImpl();
40 }
41
42 } // namespace api
43
44 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698