| 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> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 // Construction-time options. Everything in this structure should have | 51 // Construction-time options. Everything in this structure should have |
| 52 // a sane default. | 52 // a sane default. |
| 53 struct Options { | 53 struct Options { |
| 54 Options() {} | 54 Options() {} |
| 55 | 55 |
| 56 // Root of the ppd serving hierarchy. | 56 // Root of the ppd serving hierarchy. |
| 57 std::string ppd_server_root = "https://www.gstatic.com/chromeos_printing"; | 57 std::string ppd_server_root = "https://www.gstatic.com/chromeos_printing"; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // Result of a ResolvePpd() call. If the result code is SUCCESS, then the | 60 // Result of a ResolvePpd() call. |
| 61 // string holds the contents of a PPD (that may or may not be gzipped). | 61 // If the result code is SUCCESS, then: |
| 62 // Otherwise, the string will be empty. | 62 // string holds the contents of a PPD (that may or may not be gzipped). |
| 63 // required_filters holds the names of the filters referenced in the ppd. |
| 64 // Otherwise, these fields will be empty. |
| 63 using ResolvePpdCallback = | 65 using ResolvePpdCallback = |
| 64 base::Callback<void(CallbackResultCode, const std::string&)>; | 66 base::Callback<void(CallbackResultCode, |
| 67 const std::string&, |
| 68 const std::vector<std::string>& required_filters)>; |
| 65 | 69 |
| 66 // Result of a ResolveManufacturers() call. If the result code is SUCCESS, | 70 // Result of a ResolveManufacturers() call. If the result code is SUCCESS, |
| 67 // then the vector contains a sorted list of manufacturers for which we have | 71 // then the vector contains a sorted list of manufacturers for which we have |
| 68 // at least one printer driver. | 72 // at least one printer driver. |
| 69 using ResolveManufacturersCallback = | 73 using ResolveManufacturersCallback = |
| 70 base::Callback<void(CallbackResultCode, const std::vector<std::string>&)>; | 74 base::Callback<void(CallbackResultCode, const std::vector<std::string>&)>; |
| 71 | 75 |
| 72 // Result of a ResolvePrinters() call. If the result code is SUCCESS, then | 76 // Result of a ResolvePrinters() call. If the result code is SUCCESS, then |
| 73 // the vector contains a sorted list of all printer models from the given | 77 // the vector contains a sorted list of all printer models from the given |
| 74 // manufacturer for which we have a driver. | 78 // manufacturer for which we have a driver. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 140 |
| 137 protected: | 141 protected: |
| 138 friend class base::RefCounted<PpdProvider>; | 142 friend class base::RefCounted<PpdProvider>; |
| 139 virtual ~PpdProvider() {} | 143 virtual ~PpdProvider() {} |
| 140 }; | 144 }; |
| 141 | 145 |
| 142 } // namespace printing | 146 } // namespace printing |
| 143 } // namespace chromeos | 147 } // namespace chromeos |
| 144 | 148 |
| 145 #endif // CHROMEOS_PRINTING_PPD_PROVIDER_H_ | 149 #endif // CHROMEOS_PRINTING_PPD_PROVIDER_H_ |
| OLD | NEW |