Chromium Code Reviews| 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 CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | |
| 11 #include "base/values.h" | 12 #include "base/values.h" |
| 12 #include "printing/backend/print_backend.h" | 13 #include "printing/backend/print_backend.h" |
| 13 | 14 |
| 14 class Profile; | 15 class Profile; |
| 15 | 16 |
| 16 namespace printing { | 17 namespace printing { |
| 17 | 18 |
| 19 using PrinterSetupCallback = | |
| 20 base::Callback<void(std::unique_ptr<base::DictionaryValue>)>; | |
| 21 | |
| 18 // Returns the name of the default printer. | 22 // Returns the name of the default printer. |
| 19 std::string GetDefaultPrinterOnBlockingPoolThread(); | 23 std::string GetDefaultPrinterOnBlockingPoolThread(); |
| 20 | 24 |
| 21 // Returns printers for display in the print dialog. | 25 // Returns printers for display in the print dialog. |
| 22 PrinterList EnumeratePrintersOnBlockingPoolThread(Profile* profile); | 26 PrinterList EnumeratePrintersOnBlockingPoolThread(Profile* profile); |
| 23 | 27 |
| 28 // Returns the PrinterBasicInfo for |printer_name| from the backend. Attempts | |
| 29 // to setup the printer if necessary. Returns nullptr if there is an error. | |
|
Lei Zhang
2016/11/02 23:09:22
Documentation is not quite right. void functions d
skau
2016/11/03 22:38:08
Thanks. I forgot to change the comment when I cha
| |
| 30 void ConfigurePrinterAndFetchCapabilities(Profile* profile, | |
| 31 const std::string& printer_name, | |
| 32 const PrinterSetupCallback& cb); | |
| 33 | |
| 24 } // namespace printing | 34 } // namespace printing |
| 25 | 35 |
| 26 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ | 36 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINTER_BACKEND_PROXY_H_ |
| OLD | NEW |