| 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 #ifndef EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ | 6 #define EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 8 #include <string> | 9 #include <string> |
| 9 #include <vector> | 10 #include <vector> |
| 10 | 11 |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/scoped_ptr.h" | |
| 13 #include "extensions/browser/api/async_api_function.h" | 13 #include "extensions/browser/api/async_api_function.h" |
| 14 #include "extensions/browser/api/document_scan/document_scan_interface.h" | 14 #include "extensions/browser/api/document_scan/document_scan_interface.h" |
| 15 #include "extensions/common/api/document_scan.h" | 15 #include "extensions/common/api/document_scan.h" |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 namespace api { | 19 namespace api { |
| 20 | 20 |
| 21 class DocumentScanScanFunction : public AsyncApiFunction { | 21 class DocumentScanScanFunction : public AsyncApiFunction { |
| 22 public: | 22 public: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 friend class DocumentScanScanFunctionTest; | 35 friend class DocumentScanScanFunctionTest; |
| 36 | 36 |
| 37 void OnScannerListReceived( | 37 void OnScannerListReceived( |
| 38 const std::vector<DocumentScanInterface::ScannerDescription>& | 38 const std::vector<DocumentScanInterface::ScannerDescription>& |
| 39 scanner_descriptions, | 39 scanner_descriptions, |
| 40 const std::string& error); | 40 const std::string& error); |
| 41 void OnResultsReceived(const std::string& scanned_image, | 41 void OnResultsReceived(const std::string& scanned_image, |
| 42 const std::string& mime_type, | 42 const std::string& mime_type, |
| 43 const std::string& error); | 43 const std::string& error); |
| 44 | 44 |
| 45 scoped_ptr<document_scan::Scan::Params> params_; | 45 std::unique_ptr<document_scan::Scan::Params> params_; |
| 46 scoped_ptr<DocumentScanInterface> document_scan_interface_; | 46 std::unique_ptr<DocumentScanInterface> document_scan_interface_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(DocumentScanScanFunction); | 48 DISALLOW_COPY_AND_ASSIGN(DocumentScanScanFunction); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 } // namespace api | 51 } // namespace api |
| 52 | 52 |
| 53 } // namespace extensions | 53 } // namespace extensions |
| 54 | 54 |
| 55 #endif // EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ | 55 #endif // EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ |
| OLD | NEW |