OLD | NEW |
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_PPD_PROVIDER_H_ | 5 #ifndef CHROMEOS_PRINTING_PPD_PROVIDER_H_ |
6 #define CHROMEOS_PRINTING_PPD_PROVIDER_H_ | 6 #define CHROMEOS_PRINTING_PPD_PROVIDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
15 #include "chromeos/chromeos_export.h" | 15 #include "chromeos/chromeos_export.h" |
16 #include "chromeos/printing/printer_configuration.h" | 16 #include "chromeos/printing/printer_configuration.h" |
17 | 17 |
18 namespace net { | 18 namespace net { |
19 class URLRequestContextGetter; | 19 class URLRequestContextGetter; |
20 } | 20 } |
21 | 21 |
22 namespace chromeos { | 22 namespace chromeos { |
23 namespace printing { | |
24 | 23 |
25 class PpdCache; | 24 class PpdCache; |
26 | 25 |
27 // PpdProvider is responsible for mapping printer descriptions to | 26 // PpdProvider is responsible for mapping printer descriptions to |
28 // CUPS-PostScript Printer Description (PPD) files. It provides PPDs that a | 27 // CUPS-PostScript Printer Description (PPD) files. It provides PPDs that a |
29 // user previously identified for use, and falls back to querying quirksserver | 28 // user previously identified for use, and falls back to querying quirksserver |
30 // based on manufacturer/model of the printer. | 29 // based on manufacturer/model of the printer. |
31 // | 30 // |
32 // All functions in this class must be called from a sequenced context. | 31 // All functions in this class must be called from a sequenced context. |
33 class CHROMEOS_EXPORT PpdProvider : public base::RefCounted<PpdProvider> { | 32 class CHROMEOS_EXPORT PpdProvider : public base::RefCounted<PpdProvider> { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // | 129 // |
131 // |cb| will be called on the invoking thread, and will be sequenced. | 130 // |cb| will be called on the invoking thread, and will be sequenced. |
132 virtual void ResolvePpd(const Printer::PpdReference& reference, | 131 virtual void ResolvePpd(const Printer::PpdReference& reference, |
133 const ResolvePpdCallback& cb) = 0; | 132 const ResolvePpdCallback& cb) = 0; |
134 | 133 |
135 protected: | 134 protected: |
136 friend class base::RefCounted<PpdProvider>; | 135 friend class base::RefCounted<PpdProvider>; |
137 virtual ~PpdProvider() {} | 136 virtual ~PpdProvider() {} |
138 }; | 137 }; |
139 | 138 |
140 } // namespace printing | |
141 } // namespace chromeos | 139 } // namespace chromeos |
142 | 140 |
143 #endif // CHROMEOS_PRINTING_PPD_PROVIDER_H_ | 141 #endif // CHROMEOS_PRINTING_PPD_PROVIDER_H_ |
OLD | NEW |