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_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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 int index, | 81 int index, |
| 82 void* params) override; | 82 void* params) override; |
| 83 | 83 |
| 84 void HandleStartDiscovery(const base::ListValue* args); | 84 void HandleStartDiscovery(const base::ListValue* args); |
| 85 void HandleStopDiscovery(const base::ListValue* args); | 85 void HandleStopDiscovery(const base::ListValue* args); |
| 86 | 86 |
| 87 // chromeos::PrinterDiscoverer::Observer override: | 87 // chromeos::PrinterDiscoverer::Observer override: |
| 88 void OnPrintersFound(const std::vector<Printer>& printers) override; | 88 void OnPrintersFound(const std::vector<Printer>& printers) override; |
| 89 void OnDiscoveryDone() override; | 89 void OnDiscoveryDone() override; |
| 90 | 90 |
| 91 // Invokes debugd to add the printer to CUPS. If |ipp_everywhere| is true, | |
| 92 // automatic configuration will be attempted. |ppd_path| should be a path | |
|
Carlson
2016/12/01 22:59:52
Comment should indicate that ppd_path is ignored (
skau
2016/12/05 20:40:51
Done.
| |
| 93 // to the ppd cache appropriate for the printer. | |
| 94 void AddPrinterToCups(std::unique_ptr<Printer> printer, | |
| 95 const std::string& ppd_path, | |
|
Carlson
2016/12/05 23:40:11
Shouldn't this be a base::FilePath?
skau
2016/12/06 20:55:46
It goes onto the DBus as a string so it doesn't re
| |
| 96 bool ipp_everywhere); | |
| 97 | |
| 98 // Callback for PpdProvider::ResolveCallback. | |
| 99 void OnPPDResolved(std::unique_ptr<Printer> printer, | |
| 100 printing::PpdProvider::CallbackResultCode result, | |
| 101 base::FilePath ppd_path); | |
| 102 | |
| 91 std::unique_ptr<chromeos::PrinterDiscoverer> printer_discoverer_; | 103 std::unique_ptr<chromeos::PrinterDiscoverer> printer_discoverer_; |
| 92 std::unique_ptr<chromeos::printing::PpdProvider> ppd_provider_; | 104 std::unique_ptr<chromeos::printing::PpdProvider> ppd_provider_; |
| 93 | 105 |
| 94 Profile* profile_; | 106 Profile* profile_; |
| 95 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; | 107 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
| 96 std::string webui_callback_id_; | 108 std::string webui_callback_id_; |
| 97 | 109 |
| 98 base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; | 110 base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; |
| 99 | 111 |
| 100 DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler); | 112 DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler); |
| 101 }; | 113 }; |
| 102 | 114 |
| 103 } // namespace settings | 115 } // namespace settings |
| 104 } // namespace chromeos | 116 } // namespace chromeos |
| 105 | 117 |
| 106 #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 |