| Index: extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h
|
| diff --git a/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h b/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h
|
| index 611e3118ef8b9aada128d5adbc5a43f40e46feed..9e1da1ad422c088fa89f87b2536bb98f5cf8641a 100644
|
| --- a/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h
|
| +++ b/extensions/browser/api/printer_provider_internal/printer_provider_internal_api.h
|
| @@ -48,6 +48,7 @@ class PrinterProviderInternalAPI : public BrowserContextKeyedAPI {
|
| friend class PrinterProviderInternalReportPrintersFunction;
|
| friend class PrinterProviderInternalReportPrinterCapabilityFunction;
|
| friend class PrinterProviderInternalReportPrintResultFunction;
|
| + friend class PrinterProviderInternalReportUsbPrinterInfoFunction;
|
|
|
| // BrowserContextKeyedAPI implementation.
|
| static const bool kServiceRedirectedInIncognito = true;
|
| @@ -75,6 +76,14 @@ class PrinterProviderInternalAPI : public BrowserContextKeyedAPI {
|
| int request_id,
|
| core_api::printer_provider_internal::PrintError error);
|
|
|
| + // Notifies observers that a printerProvider.onGetUsbPrinterInfoRequested
|
| + // callback has been called. Called from
|
| + // |PrinterProviderInternalReportUsbPrinterInfoFunction|.
|
| + void NotifyGetUsbPrinterInfoResult(
|
| + const Extension* extension,
|
| + int request_id,
|
| + const core_api::printer_provider::PrinterInfo* printer_info);
|
| +
|
| ObserverList<PrinterProviderInternalAPIObserver> observers_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalAPI);
|
| @@ -151,6 +160,22 @@ class PrinterProviderInternalGetPrintDataFunction
|
| DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalGetPrintDataFunction);
|
| };
|
|
|
| +class PrinterProviderInternalReportUsbPrinterInfoFunction
|
| + : public UIThreadExtensionFunction {
|
| + public:
|
| + PrinterProviderInternalReportUsbPrinterInfoFunction();
|
| +
|
| + protected:
|
| + ~PrinterProviderInternalReportUsbPrinterInfoFunction() override;
|
| + ExtensionFunction::ResponseAction Run() override;
|
| +
|
| + private:
|
| + DECLARE_EXTENSION_FUNCTION("printerProviderInternal.reportUsbPrinterInfo",
|
| + PRINTERPROVIDERINTERNAL_REPORTUSBPRINTERINFO)
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(PrinterProviderInternalReportUsbPrinterInfoFunction);
|
| +};
|
| +
|
| } // namespace extensions
|
|
|
| #endif // EXTENSIONS_BROWSER_API_PRINTER_PROVIDER_INTERNAL_PRINTER_PROVIDER_INTERNAL_API_H_
|
|
|