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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 void OnJavascriptDisallowed() override {} | 44 void OnJavascriptDisallowed() override {} |
45 | 45 |
46 private: | 46 private: |
47 // Gets all CUPS printers and return it to WebUI. | 47 // Gets all CUPS printers and return it to WebUI. |
48 void HandleGetCupsPrintersList(const base::ListValue* args); | 48 void HandleGetCupsPrintersList(const base::ListValue* args); |
49 void HandleUpdateCupsPrinter(const base::ListValue* args); | 49 void HandleUpdateCupsPrinter(const base::ListValue* args); |
50 void HandleRemoveCupsPrinter(const base::ListValue* args); | 50 void HandleRemoveCupsPrinter(const base::ListValue* args); |
51 | 51 |
52 void HandleAddCupsPrinter(const base::ListValue* args); | 52 void HandleAddCupsPrinter(const base::ListValue* args); |
53 void OnAddedPrinter(std::unique_ptr<Printer> printer, | 53 void OnAddedPrinter(std::unique_ptr<Printer> printer, |
54 chromeos::SetupResult result); | 54 chromeos::PrinterSetupResult result); |
55 void OnAddPrinterError(); | 55 void OnAddPrinterError(); |
56 | 56 |
57 // Get a list of all manufacturers for which we have at least one model of | 57 // Get a list of all manufacturers for which we have at least one model of |
58 // printer supported. Takes one argument, the callback id for the result. | 58 // printer supported. Takes one argument, the callback id for the result. |
59 // The callback will be invoked with {success: <boolean>, models: | 59 // The callback will be invoked with {success: <boolean>, models: |
60 // <Array<string>>}. | 60 // <Array<string>>}. |
61 void HandleGetCupsPrinterManufacturers(const base::ListValue* args); | 61 void HandleGetCupsPrinterManufacturers(const base::ListValue* args); |
62 | 62 |
63 // Given a manufacturer, get a list of all models of printers for which we can | 63 // Given a manufacturer, get a list of all models of printers for which we can |
64 // get drivers. Takes two arguments - the callback id and the manufacturer | 64 // get drivers. Takes two arguments - the callback id and the manufacturer |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; | 115 base::WeakPtrFactory<CupsPrintersHandler> weak_factory_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler); | 117 DISALLOW_COPY_AND_ASSIGN(CupsPrintersHandler); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace settings | 120 } // namespace settings |
121 } // namespace chromeos | 121 } // namespace chromeos |
122 | 122 |
123 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ | 123 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CUPS_PRINTERS_HANDLER_H_ |
OLD | NEW |