| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/browser/api/document_scan/document_scan_interface.h" | 5 #include "extensions/browser/api/document_scan/document_scan_interface.h" |
| 6 | 6 |
| 7 namespace { | 7 namespace { |
| 8 | 8 |
| 9 const char kScanFunctionNotImplementedError[] = "Scan function not implemented"; | 9 const char kScanFunctionNotImplementedError[] = "Scan function not implemented"; |
| 10 | 10 |
| 11 } // namespace | 11 } // namespace |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 namespace core_api { | 15 namespace api { |
| 16 | 16 |
| 17 class DocumentScanInterfaceImpl : public DocumentScanInterface { | 17 class DocumentScanInterfaceImpl : public DocumentScanInterface { |
| 18 public: | 18 public: |
| 19 DocumentScanInterfaceImpl() {} | 19 DocumentScanInterfaceImpl() {} |
| 20 ~DocumentScanInterfaceImpl() override {} | 20 ~DocumentScanInterfaceImpl() override {} |
| 21 | 21 |
| 22 void ListScanners(const ListScannersResultsCallback& callback) override { | 22 void ListScanners(const ListScannersResultsCallback& callback) override { |
| 23 callback.Run(std::vector<ScannerDescription>(), ""); | 23 callback.Run(std::vector<ScannerDescription>(), ""); |
| 24 } | 24 } |
| 25 void Scan(const std::string& scanner_name, | 25 void Scan(const std::string& scanner_name, |
| 26 ScanMode mode, | 26 ScanMode mode, |
| 27 int resolution_dpi, | 27 int resolution_dpi, |
| 28 const ScanResultsCallback& callback) override { | 28 const ScanResultsCallback& callback) override { |
| 29 callback.Run("", "", kScanFunctionNotImplementedError); | 29 callback.Run("", "", kScanFunctionNotImplementedError); |
| 30 } | 30 } |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceImpl); | 33 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceImpl); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 // static | 36 // static |
| 37 DocumentScanInterface* DocumentScanInterface::CreateInstance() { | 37 DocumentScanInterface* DocumentScanInterface::CreateInstance() { |
| 38 return new DocumentScanInterfaceImpl(); | 38 return new DocumentScanInterfaceImpl(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 } // namespace core_api | 41 } // namespace api |
| 42 | 42 |
| 43 } // namespace extensions | 43 } // namespace extensions |
| OLD | NEW |