Re-subimission of https://codereview.chromium.org/1041213003/
[chromium-blink-merge.git] / extensions / browser / api / document_scan / document_scan_interface_chromeos.h
blobcd50d508f4ae674ddd85936f4ca11b08d89ed7d9
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.
5 #ifndef EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_INTERFACE_CHROMEOS_H_
6 #define EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_INTERFACE_CHROMEOS_H_
8 #include "extensions/browser/api/document_scan/document_scan_interface.h"
9 #include "chromeos/dbus/lorgnette_manager_client.h"
11 namespace extensions {
13 namespace core_api {
15 class DocumentScanInterfaceChromeos : public DocumentScanInterface {
16 public:
17 DocumentScanInterfaceChromeos();
18 ~DocumentScanInterfaceChromeos() override;
20 void ListScanners(const ListScannersResultsCallback& callback) override;
21 void Scan(const std::string& scanner_name,
22 ScanMode mode,
23 int resolution_dpi,
24 const ScanResultsCallback& callback) override;
26 private:
27 friend class DocumentScanInterfaceChromeosTest;
29 void OnScannerListReceived(
30 const ListScannersResultsCallback& callback,
31 bool succeeded,
32 const chromeos::LorgnetteManagerClient::ScannerTable& scanners);
33 void OnScanCompleted(const ScanResultsCallback& callback,
34 bool succeeded,
35 const std::string& image_data);
36 chromeos::LorgnetteManagerClient* GetLorgnetteManagerClient();
38 // Guaranteed to outlive |this|.
39 chromeos::LorgnetteManagerClient* lorgnette_manager_client_;
41 DISALLOW_COPY_AND_ASSIGN(DocumentScanInterfaceChromeos);
44 } // namespace core_api
46 } // namespace extensions
48 #endif // EXTENSIONS_BROWSER_API_DOCUMENT_SCAN_DOCUMENT_SCAN_INTERFACE_CHROMEOS_H_