OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 const cloud_print::DeviceDescription& description, | 313 const cloud_print::DeviceDescription& description, |
314 bool has_local_printing, | 314 bool has_local_printing, |
315 base::DictionaryValue* printer_value); | 315 base::DictionaryValue* printer_value); |
316 #endif | 316 #endif |
317 | 317 |
318 // Lazily creates |extension_printer_handler_| that can be used to handle | 318 // Lazily creates |extension_printer_handler_| that can be used to handle |
319 // extension printers requests. | 319 // extension printers requests. |
320 void EnsureExtensionPrinterHandlerSet(); | 320 void EnsureExtensionPrinterHandlerSet(); |
321 | 321 |
322 // Called when a list of printers is reported by an extension. | 322 // Called when a list of printers is reported by an extension. |
| 323 // |callback_id|: The javascript callback to call if all extension printers |
| 324 // are loaded (when |done| = true) |
323 // |printers|: The list of printers managed by the extension. | 325 // |printers|: The list of printers managed by the extension. |
324 // |done|: Whether all the extensions have reported the list of printers | 326 // |done|: Whether all the extensions have reported the list of printers |
325 // they manage. | 327 // they manage. |
326 void OnGotPrintersForExtension(const base::ListValue& printers, bool done); | 328 void OnGotPrintersForExtension(const std::string& callback_id, |
| 329 const base::ListValue& printers, |
| 330 bool done); |
327 | 331 |
328 // Called when an extension reports information requested for a provisional | 332 // Called when an extension reports information requested for a provisional |
329 // printer. | 333 // printer. |
330 // |printer_id|: The provisional printer id. | 334 // |printer_id|: The provisional printer id. |
331 // |printer_info|: The data reported by the extension. | 335 // |printer_info|: The data reported by the extension. |
332 void OnGotExtensionPrinterInfo(const std::string& printer_id, | 336 void OnGotExtensionPrinterInfo(const std::string& printer_id, |
333 const base::DictionaryValue& printer_info); | 337 const base::DictionaryValue& printer_info); |
334 | 338 |
335 // Called when an extension reports the set of print capabilites for a | 339 // Called when an extension reports the set of print capabilites for a |
336 // printer. | 340 // printer. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // Proxy for calls to the print backend. Lazily initialized since web_ui() is | 406 // Proxy for calls to the print backend. Lazily initialized since web_ui() is |
403 // not available at construction time. | 407 // not available at construction time. |
404 std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_; | 408 std::unique_ptr<printing::PrinterBackendProxy> printer_backend_proxy_; |
405 | 409 |
406 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 410 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
407 | 411 |
408 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 412 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
409 }; | 413 }; |
410 | 414 |
411 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 415 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |