| 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..016b688190dc84f70fad277c24912906fcfbfa8c 100644 | 
| --- a/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h | 
| +++ b/chrome/browser/ui/webui/print_preview/printer_backend_proxy.h | 
| @@ -12,28 +12,45 @@ | 
| #include "base/values.h" | 
| #include "printing/backend/print_backend.h" | 
|  | 
| +#if defined(OS_CHROMEOS) | 
| class Profile; | 
| +#endif | 
|  | 
| namespace printing { | 
|  | 
| +using DefaultPrinterCallback = | 
| +    base::Callback<void(const std::string& printer_name)>; | 
| + | 
| 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); | 
| +    base::Callback<void(std::unique_ptr<base::DictionaryValue> settings)>; | 
| + | 
| +class PrinterBackendProxy { | 
| + public: | 
| +#if defined(OS_CHROMEOS) | 
| +  static std::unique_ptr<PrinterBackendProxy> Create(Profile* profile); | 
| +#else | 
| +  static std::unique_ptr<PrinterBackendProxy> Create(); | 
| +#endif | 
| + | 
| +  virtual ~PrinterBackendProxy() = default; | 
| + | 
| +  // Returns the name of the default printer through |cb|.  This method expects | 
| +  // to be called on the UI thread. | 
| +  virtual void GetDefaultPrinter(const DefaultPrinterCallback& cb) = 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 | 
|  | 
|  |