| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "extensions/browser/api/async_api_function.h" | 12 #include "extensions/browser/api/async_api_function.h" |
| 13 #include "extensions/browser/api/document_scan/document_scan_interface.h" | 13 #include "extensions/browser/api/document_scan/document_scan_interface.h" |
| 14 #include "extensions/common/api/document_scan.h" | 14 #include "extensions/common/api/document_scan.h" |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 namespace core_api { | 18 namespace api { |
| 19 | 19 |
| 20 class DocumentScanScanFunction : public AsyncApiFunction { | 20 class DocumentScanScanFunction : public AsyncApiFunction { |
| 21 public: | 21 public: |
| 22 DECLARE_EXTENSION_FUNCTION("documentScan.scan", DOCUMENT_SCAN_SCAN) | 22 DECLARE_EXTENSION_FUNCTION("documentScan.scan", DOCUMENT_SCAN_SCAN) |
| 23 DocumentScanScanFunction(); | 23 DocumentScanScanFunction(); |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 ~DocumentScanScanFunction() override; | 26 ~DocumentScanScanFunction() override; |
| 27 | 27 |
| 28 // AsyncApiFunction: | 28 // AsyncApiFunction: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 40 void OnResultsReceived(const std::string& scanned_image, | 40 void OnResultsReceived(const std::string& scanned_image, |
| 41 const std::string& mime_type, | 41 const std::string& mime_type, |
| 42 const std::string& error); | 42 const std::string& error); |
| 43 | 43 |
| 44 scoped_ptr<document_scan::Scan::Params> params_; | 44 scoped_ptr<document_scan::Scan::Params> params_; |
| 45 scoped_ptr<DocumentScanInterface> document_scan_interface_; | 45 scoped_ptr<DocumentScanInterface> document_scan_interface_; |
| 46 | 46 |
| 47 DISALLOW_COPY_AND_ASSIGN(DocumentScanScanFunction); | 47 DISALLOW_COPY_AND_ASSIGN(DocumentScanScanFunction); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace core_api | 50 } // namespace api |
| 51 | 51 |
| 52 } // namespace extensions | 52 } // namespace extensions |
| 53 | 53 |
| 54 #endif // EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ | 54 #endif // EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_API_H_ |
| OLD | NEW |