| Index: extensions/browser/api/printer_provider/printer_provider_api.h
|
| diff --git a/extensions/browser/api/printer_provider/printer_provider_api.h b/extensions/browser/api/printer_provider/printer_provider_api.h
|
| index f499e5ecc88dbe0c75ec829c3d74ab2e118d1d91..33a078353a097e5c573fa7e80228b0f4744570e4 100644
|
| --- a/extensions/browser/api/printer_provider/printer_provider_api.h
|
| +++ b/extensions/browser/api/printer_provider/printer_provider_api.h
|
| @@ -19,6 +19,10 @@ namespace content {
|
| class BrowserContext;
|
| }
|
|
|
| +namespace device {
|
| +class UsbDevice;
|
| +}
|
| +
|
| namespace extensions {
|
| class Extension;
|
| struct PrinterProviderPrintJob;
|
| @@ -35,6 +39,8 @@ class PrinterProviderAPI : public KeyedService {
|
| base::Callback<void(const base::DictionaryValue& capability)>;
|
| using PrintCallback =
|
| base::Callback<void(bool success, const std::string& error)>;
|
| + using UsbAccessGrantedCallback =
|
| + base::Callback<void(const base::DictionaryValue& printer_info)>;
|
|
|
| static PrinterProviderAPI* Create(content::BrowserContext* context);
|
|
|
| @@ -82,6 +88,12 @@ class PrinterProviderAPI : public KeyedService {
|
| // It should return NULL if the job for the request does not exist.
|
| virtual const PrinterProviderPrintJob* GetPrintJob(const Extension* extension,
|
| int request_id) const = 0;
|
| +
|
| + // Notifies the given extension that it has been granted access to the given
|
| + virtual void DispatchGrantUsbPrinterAccess(
|
| + const std::string& extension_id,
|
| + int device_id,
|
| + const PrinterProviderAPI::UsbAccessGrantedCallback& callback) = 0;
|
| };
|
|
|
| } // namespace extensions
|
|
|