Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: extensions/browser/api/printer_provider/printer_provider_api.h

Issue 1148383002: Add onGetUsbPrinterInfoRequested event to printerProvider API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Only include the permission granting part in this patch. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d4402e50e5e3a4925f12e08de34152783d2ceb05 100644
--- a/extensions/browser/api/printer_provider/printer_provider_api.h
+++ b/extensions/browser/api/printer_provider/printer_provider_api.h
@@ -35,6 +35,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 +84,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
tbarzic 2015/05/27 00:11:03 Comment is unfinished
Reilly Grant (use Gerrit) 2015/05/28 21:04:10 Done.
+ virtual void DispatchGrantUsbPrinterAccess(
+ const std::string& extension_id,
+ int device_id,
+ const PrinterProviderAPI::UsbAccessGrantedCallback& callback) = 0;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698