Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/chromeos/printing/combining_printer_detector.h

Issue 2945303005: Refactor PrinterDiscoverer and PrinterDetector to use a common interface. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/BUILD.gn ('k') | chrome/browser/chromeos/printing/combining_printer_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698