| 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_chromeos.
h" | 5 #include "extensions/browser/api/document_scan/document_scan_interface_chromeos.
h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 DocumentScanInterface::ScannerDescription>& scanners, | 34 DocumentScanInterface::ScannerDescription>& scanners, |
| 35 const std::string& error)); | 35 const std::string& error)); |
| 36 | 36 |
| 37 MOCK_METHOD3(OnScanCompleted, | 37 MOCK_METHOD3(OnScanCompleted, |
| 38 void(const std::string& scanned_image, | 38 void(const std::string& scanned_image, |
| 39 const std::string& mime_type, | 39 const std::string& mime_type, |
| 40 const std::string& error)); | 40 const std::string& error)); |
| 41 | 41 |
| 42 protected: | 42 protected: |
| 43 DocumentScanInterfaceChromeos scan_interface_; | 43 DocumentScanInterfaceChromeos scan_interface_; |
| 44 scoped_ptr<chromeos::MockLorgnetteManagerClient> client_; | 44 std::unique_ptr<chromeos::MockLorgnetteManagerClient> client_; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 ACTION_P2(InvokeListScannersCallback, scanner_list, error) { | 47 ACTION_P2(InvokeListScannersCallback, scanner_list, error) { |
| 48 ::std::tr1::get<0>(args).Run(scanner_list, error); | 48 ::std::tr1::get<0>(args).Run(scanner_list, error); |
| 49 } | 49 } |
| 50 | 50 |
| 51 ACTION_P2(InvokeScanCallback, succeeded, image_data) { | 51 ACTION_P2(InvokeScanCallback, succeeded, image_data) { |
| 52 ::std::tr1::get<2>(args).Run(succeeded, image_data); | 52 ::std::tr1::get<2>(args).Run(succeeded, image_data); |
| 53 } | 53 } |
| 54 | 54 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 EXPECT_CALL(*this, OnScanCompleted(kExpectedImageData, "image/png", "")); | 118 EXPECT_CALL(*this, OnScanCompleted(kExpectedImageData, "image/png", "")); |
| 119 scan_interface_.Scan( | 119 scan_interface_.Scan( |
| 120 kScannerName, DocumentScanInterface::kScanModeColor, kResolution, | 120 kScannerName, DocumentScanInterface::kScanModeColor, kResolution, |
| 121 base::Bind(&DocumentScanInterfaceChromeosTest::OnScanCompleted, | 121 base::Bind(&DocumentScanInterfaceChromeosTest::OnScanCompleted, |
| 122 base::Unretained(this))); | 122 base::Unretained(this))); |
| 123 } | 123 } |
| 124 | 124 |
| 125 } // namespace api | 125 } // namespace api |
| 126 | 126 |
| 127 } // namespace extensions | 127 } // namespace extensions |
| OLD | NEW |