Index: chromeos/printing/fake_printer_detector.h |
diff --git a/chromeos/printing/fake_printer_detector.h b/chromeos/printing/fake_printer_detector.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..77f73d625487780ff3712808674dba1651c6600e |
--- /dev/null |
+++ b/chromeos/printing/fake_printer_detector.h |
@@ -0,0 +1,38 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROMEOS_PRINTING_FAKE_PRINTER_DETECTOR_H_ |
+#define CHREOMOS_PRINTING_FAKE_PRINTER_DETECTOR_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
+#include "chromeos/printing/printer_configuration.h" |
+#include "chromeos/printing/printer_detector.h" |
+ |
+namespace chromeos { |
+ |
+class FakePrinterDetector : public PrinterDetector { |
+ public: |
+ FakePrinterDetector(); |
+ ~FakePrinterDetector(); |
+ |
+ bool StartDiscovery() override; |
+ bool StopDiscovery() override; |
+ void SetObserver(PrinterDetector::Observer* observer) override; |
+ |
+ private: |
+ void EmitPrinters(size_t start, size_t end); |
+ |
+ std::vector<chromeos::Printer> printers_; |
+ bool discovery_running_; |
+ PrinterDetector::Observer* observer_; |
+ |
+ base::WeakPtrFactory<FakePrinterDetector> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(FakePrinterDetector); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHREOMOS_PRINTING_FAKE_PRINTER_DETECTOR_H_ |