| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_EXTENSION_PRINTER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 // Methods used as wrappers to callbacks for extensions::PrinterProviderAPI | 96 // Methods used as wrappers to callbacks for extensions::PrinterProviderAPI |
| 97 // methods, primarily so the callbacks can be bound to this class' weak ptr. | 97 // methods, primarily so the callbacks can be bound to this class' weak ptr. |
| 98 // They just propagate results to callbacks passed to them. | 98 // They just propagate results to callbacks passed to them. |
| 99 void WrapGetPrintersCallback( | 99 void WrapGetPrintersCallback( |
| 100 const PrinterHandler::GetPrintersCallback& callback, | 100 const PrinterHandler::GetPrintersCallback& callback, |
| 101 const base::ListValue& printers, | 101 const base::ListValue& printers, |
| 102 bool done); | 102 bool done); |
| 103 void WrapGetCapabilityCallback( | 103 void WrapGetCapabilityCallback( |
| 104 const PrinterHandler::GetCapabilityCallback& callback, | 104 const PrinterHandler::GetCapabilityCallback& callback, |
| 105 const std::string& destination_id, | |
| 106 const base::DictionaryValue& capability); | 105 const base::DictionaryValue& capability); |
| 107 void WrapPrintCallback(const PrinterHandler::PrintCallback& callback, | 106 void WrapPrintCallback(const PrinterHandler::PrintCallback& callback, |
| 108 bool success, | 107 bool success, |
| 109 const std::string& status); | 108 const std::string& status); |
| 110 void WrapGetPrinterInfoCallback(const GetPrinterInfoCallback& callback, | 109 void WrapGetPrinterInfoCallback(const GetPrinterInfoCallback& callback, |
| 111 const base::DictionaryValue& printer_info); | 110 const base::DictionaryValue& printer_info); |
| 112 | 111 |
| 113 void OnUsbDevicesEnumerated( | 112 void OnUsbDevicesEnumerated( |
| 114 const PrinterHandler::GetPrintersCallback& callback, | 113 const PrinterHandler::GetPrintersCallback& callback, |
| 115 const std::vector<scoped_refptr<device::UsbDevice>>& devices); | 114 const std::vector<scoped_refptr<device::UsbDevice>>& devices); |
| 116 | 115 |
| 117 content::BrowserContext* browser_context_; | 116 content::BrowserContext* browser_context_; |
| 118 | 117 |
| 119 std::unique_ptr<printing::PWGRasterConverter> pwg_raster_converter_; | 118 std::unique_ptr<printing::PWGRasterConverter> pwg_raster_converter_; |
| 120 int pending_enumeration_count_ = 0; | 119 int pending_enumeration_count_ = 0; |
| 121 | 120 |
| 122 base::WeakPtrFactory<ExtensionPrinterHandler> weak_ptr_factory_; | 121 base::WeakPtrFactory<ExtensionPrinterHandler> weak_ptr_factory_; |
| 123 | 122 |
| 124 DISALLOW_COPY_AND_ASSIGN(ExtensionPrinterHandler); | 123 DISALLOW_COPY_AND_ASSIGN(ExtensionPrinterHandler); |
| 125 }; | 124 }; |
| 126 | 125 |
| 127 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ | 126 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_EXTENSION_PRINTER_HANDLER_H_ |
| OLD | NEW |