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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DOCUMENT_SCAN_DOCUMENT_SCAN_INTERFACE_CHRO
MEOS_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_API_DOCUMENT_SCAN_DOCUMENT_SCAN_INTERFACE_CHRO
MEOS_H_ | |
7 | |
8 #include "chrome/browser/extensions/api/document_scan/document_scan_interface.h" | |
9 #include "chromeos/dbus/lorgnette_manager_client.h" | |
10 #include "chromeos/dbus/pipe_reader.h" | |
11 | |
12 namespace extensions { | |
13 | |
14 namespace api { | |
15 | |
16 class DocumentScanInterfaceChromeos : public DocumentScanInterface { | |
17 public: | |
18 DocumentScanInterfaceChromeos(); | |
19 virtual ~DocumentScanInterfaceChromeos(); | |
20 | |
21 virtual void ListScanners( | |
22 const ListScannersResultsCallback& callback) override; | |
23 virtual void Scan(const std::string& scanner_name, | |
24 ScanMode mode, | |
25 int resolution_dpi, | |
26 const ScanResultsCallback& callback) override; | |
27 | |
28 private: | |
29 friend class DocumentScanInterfaceChromeosTest; | |
30 | |
31 void OnScannerListReceived( | |
32 const ListScannersResultsCallback& callback, | |
33 bool succeeded, | |
34 const chromeos::LorgnetteManagerClient::ScannerTable &scanners); | |
35 void OnScanCompleted(const ScanResultsCallback &callback, bool succeeded); | |
36 void OnScanDataCompleted(); | |
37 std::string GetImageURL(std::string image_data); | |
38 chromeos::LorgnetteManagerClient* GetLorgnetteManagerClient(); | |
39 | |
40 scoped_ptr<chromeos::PipeReaderForString> pipe_reader_; | |
41 std::string scanned_image_data_; | |
42 chromeos::LorgnetteManagerClient* lorgnette_manager_client_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceChromeos); | |
45 }; | |
46 | |
47 } // namespace api | |
48 | |
49 } // namespace extensions | |
50 | |
51 #endif // CHROME_BROWSER_EXTENSIONS_API_DOCUMENT_SCAN_DOCUMENT_SCAN_INTERFACE_C
HROMEOS_H_ | |
OLD | NEW |