| Index: chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
|
| diff --git a/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h b/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
|
| index d2dff83b71a1bfb6e069101fccaa9d6a2fb1d897..d81b76d47cad0c30d3892e52d56312ea3f0c0cd9 100644
|
| --- a/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
|
| +++ b/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h
|
| @@ -12,7 +12,9 @@
|
| #include "base/values.h"
|
| #include "printing/backend/print_backend.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| class Profile;
|
| +#endif
|
|
|
| namespace printing {
|
|
|
| @@ -21,19 +23,28 @@ using EnumeratePrintersCallback = base::Callback<void(const PrinterList&)>;
|
| using PrinterSetupCallback =
|
| base::Callback<void(std::unique_ptr<base::DictionaryValue>)>;
|
|
|
| -// Returns the name of the default printer.
|
| -std::string GetDefaultPrinterOnBlockingPoolThread();
|
| -
|
| -// Retrieves printers for display in the print dialog and calls |cb| with the
|
| -// list. This method expects to be called on the UI thread.
|
| -void EnumeratePrinters(Profile* profile, const EnumeratePrintersCallback& cb);
|
| -
|
| -// Verifies printer setup if needed then retrieves printer capabilities for
|
| -// |printer_name|. |cb| is called with the capabilities dictionary or nullptr
|
| -// if one of the steps failed.
|
| -void ConfigurePrinterAndFetchCapabilities(Profile* profile,
|
| - const std::string& printer_name,
|
| - const PrinterSetupCallback& cb);
|
| +class PrinterBackendProxy {
|
| + public:
|
| +#if defined(OS_CHROMEOS)
|
| + static std::unique_ptr<PrinterBackendProxy> Create(Profile* profile);
|
| +#else
|
| + static std::unique_ptr<PrinterBackendProxy> Create();
|
| +#endif
|
| +
|
| + // Returns the name of the default printer.
|
| + virtual std::string GetDefaultPrinterOnBlockingPoolThread() = 0;
|
| +
|
| + // Retrieves printers for display in the print dialog and calls |cb| with the
|
| + // list. This method expects to be called on the UI thread.
|
| + virtual void EnumeratePrinters(const EnumeratePrintersCallback& cb) = 0;
|
| +
|
| + // Verifies printer setup if needed then retrieves printer capabilities for
|
| + // |printer_name|. |cb| is called with the capabilities dictionary or nullptr
|
| + // if one of the steps failed.
|
| + virtual void ConfigurePrinterAndFetchCapabilities(
|
| + const std::string& printer_name,
|
| + const PrinterSetupCallback& cb) = 0;
|
| +};
|
|
|
| } // namespace printing
|
|
|
|
|