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

Side by Side Diff: chromeos/printing/printer_discoverer.h

Issue 2380753004: [CUPS] Implement the Webui handler for the printers auto discovery. (Closed)
Patch Set: Address michaelpg@'s comments. Created 4 years, 2 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
« no previous file with comments | « chromeos/printing/fake_printer_discoverer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ 5 #ifndef CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_
6 #define CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ 6 #define CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chromeos/printing/printer_configuration.h" 11 #include "chromeos/printing/printer_configuration.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 // Interface for printer discovery. Constructs Printer objects from USB and 15 // Interface for printer discovery. Constructs Printer objects from USB and
16 // zeroconf (DNS-SD) printers. 16 // zeroconf (DNS-SD) printers.
17 class PrinterDiscoverer { 17 class CHROMEOS_EXPORT PrinterDiscoverer {
18 public: 18 public:
19 // Interface for objects interested in detected printers. 19 // Interface for objects interested in detected printers.
20 class Observer { 20 class Observer {
21 public: 21 public:
22 // Called after discovery has started. 22 // Called after discovery has started.
23 virtual void OnDiscoveryStarted() {} 23 virtual void OnDiscoveryStarted() {}
24 24
25 // Called when discovery is stopping. OnPrintersFound will not be 25 // Called when discovery is stopping. OnPrintersFound will not be
26 // called after this occurs. 26 // called after this occurs.
27 virtual void OnDiscoveryStopping() {} 27 virtual void OnDiscoveryStopping() {}
(...skipping 26 matching lines...) Expand all
54 // oberserver more than once. 54 // oberserver more than once.
55 virtual void AddObserver(PrinterDiscoverer::Observer* observer) = 0; 55 virtual void AddObserver(PrinterDiscoverer::Observer* observer) = 0;
56 56
57 // Remove an observer of printer discovery. 57 // Remove an observer of printer discovery.
58 virtual void RemoveObserver(PrinterDiscoverer::Observer* observer) = 0; 58 virtual void RemoveObserver(PrinterDiscoverer::Observer* observer) = 0;
59 }; 59 };
60 60
61 } // namespace chromeos 61 } // namespace chromeos
62 62
63 #endif // CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_ 63 #endif // CHROMEOS_PRINTING_PRINTER_DISCOVERER_H_
OLDNEW
« no previous file with comments | « chromeos/printing/fake_printer_discoverer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698