OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_CHROMEOS_PRINTING_COMBINING_PRINTER_DETECTOR_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_PRINTING_COMBINING_PRINTER_DETECTOR_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "chrome/browser/chromeos/printing/printer_detector.h" |
| 11 |
| 12 namespace chromeos { |
| 13 |
| 14 // CombiningPrinterDetector implements PrinterDetector and exports the combined |
| 15 // results of one or more underlying PrinterDetectors. |
| 16 class CHROMEOS_EXPORT CombiningPrinterDetector : public PrinterDetector { |
| 17 public: |
| 18 // Static factory |
| 19 static std::unique_ptr<CombiningPrinterDetector> Create(); |
| 20 |
| 21 ~CombiningPrinterDetector() override = default; |
| 22 |
| 23 // Add an underlying detector to be used. Ownership is not taken. All |
| 24 // detectors should be added on the same sequence. Calling AddDetector after |
| 25 // observers have been added is disallowed. |
| 26 virtual void AddDetector(PrinterDetector* detector) = 0; |
| 27 |
| 28 // Same as AddDetector, but ownership of the detector is taken. |
| 29 virtual void AddOwnedDetector(std::unique_ptr<PrinterDetector> detector) = 0; |
| 30 }; |
| 31 |
| 32 } // namespace chromeos |
| 33 |
| 34 #endif // CHROME_BROWSER_CHROMEOS_PRINTING_COMBINING_PRINTER_DETECTOR_H_ |
OLD | NEW |