| 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_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 // Invokes debugd to add the printer to CUPS. If |ipp_everywhere| is true, | 93 // Invokes debugd to add the printer to CUPS. If |ipp_everywhere| is true, |
| 94 // automatic configuration will be attempted and |ppd_path| is ignored. | 94 // automatic configuration will be attempted and |ppd_path| is ignored. |
| 95 // |ppd_path| is the path to a Postscript Printer Description file that will | 95 // |ppd_path| is the path to a Postscript Printer Description file that will |
| 96 // be used to configure the printer capabilities. This file must be in | 96 // be used to configure the printer capabilities. This file must be in |
| 97 // Downloads or the PPD Cache. | 97 // Downloads or the PPD Cache. |
| 98 void AddPrinterToCups(std::unique_ptr<Printer> printer, | 98 void AddPrinterToCups(std::unique_ptr<Printer> printer, |
| 99 const base::FilePath& ppd_path, | 99 const base::FilePath& ppd_path, |
| 100 bool ipp_everywhere); | 100 bool ipp_everywhere); |
| 101 | 101 |
| 102 // Callback for PpdProvider::ResolveCallback. | |
| 103 void ResolvePpdDone(std::unique_ptr<Printer> printer, | |
| 104 printing::PpdProvider::CallbackResultCode result, | |
| 105 const std::string& ppd_contents); | |
| 106 | |
| 107 std::unique_ptr<chromeos::PrinterDiscoverer> printer_discoverer_; | 102 std::unique_ptr<chromeos::PrinterDiscoverer> printer_discoverer_; |
| 108 scoped_refptr<chromeos::printing::PpdProvider> ppd_provider_; | 103 scoped_refptr<chromeos::printing::PpdProvider> ppd_provider_; |
| 109 std::unique_ptr<chromeos::PrinterConfigurer> printer_configurer_; | 104 std::unique_ptr<chromeos::PrinterConfigurer> printer_configurer_; |
| 110 | 105 |
| 111 Profile* profile_; | 106 Profile* profile_; |
| 112 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; | 107 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
| 113 std::string webui_callback_id_; | 108 std::string webui_callback_id_; |
| 114 | 109 |
| 115 base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; | 110 base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; |
| 116 | 111 |
| 117 DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler); | 112 DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler); |
| 118 }; | 113 }; |
| 119 | 114 |
| 120 } // namespace settings | 115 } // namespace settings |
| 121 } // namespace chromeos | 116 } // namespace chromeos |
| 122 | 117 |
| 123 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ | 118 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ |
| OLD | NEW |