Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / extensions / browser / api / document_scan / document_scan_interface_nonchromeos.cc
blob6e8e50b9eca6e5889dff24f9c0d0009d6f083daa
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.
5 #include "extensions/browser/api/document_scan/document_scan_interface.h"
7 namespace {
9 const char kScanFunctionNotImplementedError[] = "Scan function not implemented";
11 } // namespace
13 namespace extensions {
15 namespace core_api {
17 class DocumentScanInterfaceImpl : public DocumentScanInterface {
18 public:
19 DocumentScanInterfaceImpl() {}
20 ~DocumentScanInterfaceImpl() override {}
22 void ListScanners(const ListScannersResultsCallback& callback) override {
23 callback.Run(std::vector<ScannerDescription>(), "");
25 void Scan(const std::string& scanner_name,
26 ScanMode mode,
27 int resolution_dpi,
28 const ScanResultsCallback& callback) override {
29 callback.Run("", "", kScanFunctionNotImplementedError);
32 private:
33 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceImpl);
36 // static
37 DocumentScanInterface* DocumentScanInterface::CreateInstance() {
38 return new DocumentScanInterfaceImpl();
41 } // namespace core_api
43 } // namespace extensions