OLD | NEW |
(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 |
OLD | NEW |