OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 CHROMEOS_PRINTING_FAKE_PRINTER_DETECTOR_H_ |
| 6 #define CHREOMOS_PRINTING_FAKE_PRINTER_DETECTOR_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chromeos/printing/printer_configuration.h" |
| 11 #include "chromeos/printing/printer_detector.h" |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 class FakePrinterDetector : public PrinterDetector { |
| 16 public: |
| 17 FakePrinterDetector(); |
| 18 ~FakePrinterDetector(); |
| 19 |
| 20 bool StartDiscovery() override; |
| 21 bool StopDiscovery() override; |
| 22 void SetObserver(PrinterDetector::Observer* observer) override; |
| 23 |
| 24 private: |
| 25 void EmitPrinters(size_t start, size_t end); |
| 26 |
| 27 std::vector<chromeos::Printer> printers_; |
| 28 bool discovery_running_; |
| 29 PrinterDetector::Observer* observer_; |
| 30 |
| 31 base::WeakPtrFactory<FakePrinterDetector> weak_ptr_factory_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(FakePrinterDetector); |
| 34 }; |
| 35 |
| 36 } // namespace chromeos |
| 37 |
| 38 #endif // CHREOMOS_PRINTING_FAKE_PRINTER_DETECTOR_H_ |
OLD | NEW |